The Location Puck gives your smartphone context about its location. Built on the Puck IOT platform.

Dependencies:   Puck mbed

The location puck will give your smartphone context about the phone’s location. You can later set up rules for what should happen at different locations in the smartphone companion application (Puck Central).

A tutorial for the Location Puck is available on GitHub.

Tutorials and in-depth documentation for the Puck platform is available at the project's GitHub page

Committer:
cristea
Date:
Thu Jun 19 10:40:24 2014 +0200
Revision:
1:345039810771
Parent:
0:f4fbeaabdff5
Child:
2:67d603617000
Remove remains from old not working software

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cristea 0:f4fbeaabdff5 1 #include <mbed.h>
cristea 0:f4fbeaabdff5 2
cristea 0:f4fbeaabdff5 3 DigitalOut led1(LED1);
cristea 0:f4fbeaabdff5 4 DigitalOut led2(LED2);
cristea 0:f4fbeaabdff5 5
cristea 0:f4fbeaabdff5 6 void clear() {
cristea 0:f4fbeaabdff5 7 led1 = 0;
cristea 0:f4fbeaabdff5 8 led2 = 0;
cristea 0:f4fbeaabdff5 9 }
cristea 0:f4fbeaabdff5 10
cristea 0:f4fbeaabdff5 11 void cycle(float delta) {
cristea 0:f4fbeaabdff5 12 clear();
cristea 0:f4fbeaabdff5 13 led1 = 1;
cristea 0:f4fbeaabdff5 14 wait(delta);
cristea 0:f4fbeaabdff5 15
cristea 0:f4fbeaabdff5 16 clear();
cristea 0:f4fbeaabdff5 17 led2 = 1;
cristea 0:f4fbeaabdff5 18 wait(delta);
cristea 0:f4fbeaabdff5 19 }
cristea 0:f4fbeaabdff5 20
cristea 0:f4fbeaabdff5 21 void drums(float delta) {
cristea 0:f4fbeaabdff5 22 clear();
cristea 0:f4fbeaabdff5 23 led1 = 1;
cristea 0:f4fbeaabdff5 24 wait(delta);
cristea 0:f4fbeaabdff5 25 }
cristea 0:f4fbeaabdff5 26
cristea 0:f4fbeaabdff5 27 int main() {
cristea 0:f4fbeaabdff5 28 while(1) {
cristea 0:f4fbeaabdff5 29 drums(0.3);
cristea 0:f4fbeaabdff5 30 }
cristea 1:345039810771 31 }