New Pebble IO mashup code

30 views
Skip to first unread message

Marc MERLIN

unread,
Feb 3, 2011, 6:10:55 AM2/3/11
to arduino-...@googlegroups.com, aiko-p...@googlegroups.com
A big thanks to all those of you who helped me out getting setup with my
arduino boards: playing with them kept me busy during downtime between
dives on Heron Island :)

I looked at the examples in the aiko tree, and used them to write a
program that puts all the functionality together and adds other options.

I wrote code to decode the push button combinations (this should
obviously go in a library) and I made the buttons work as such:
button 1 resets the timer
button 2 sets the LED flashing to be slaved to the LDR
button 3 sets the LED flashing to be slaved to the potentionmeter

button 2 and 3 also toggle relays 2 and 3 at the speed the LED is
flashing at for as long as they are pressed.

I think that's the best way I could find to put all the sensors at work
:)

Feel free to steal the code/move some of it to libraries where said code
belong, and do whatever you please with the code :)

I'm also attaching AikoDeviceButton.h/.cpp from the Aiko libraries with
my code that makes them a bit more useful than stock :)

(sorry, no fancy git stuff, I have not yet taken the time to learn a 4th
source control system :)

Cheers,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/

AikoDeviceButton.h
AikoDeviceButton.cpp
pebble_all_IO_mashup.pde
pebble.jpg

Marc MERLIN

unread,
Feb 13, 2011, 1:08:38 PM2/13/11
to arduino-...@googlegroups.com, aiko-p...@googlegroups.com
On Thu, Feb 03, 2011 at 03:10:55AM -0800, Marc MERLIN wrote:
> A big thanks to all those of you who helped me out getting setup with my
> arduino boards: playing with them kept me busy during downtime between
> dives on Heron Island :)
>
> I looked at the examples in the aiko tree, and used them to write a
> program that puts all the functionality together and adds other options.
>
> I wrote code to decode the push button combinations (this should
> obviously go in a library) and I made the buttons work as such:
> button 1 resets the timer
> button 2 sets the LED flashing to be slaved to the LDR
> button 3 sets the LED flashing to be slaved to the potentionmeter
>
> button 2 and 3 also toggle relays 2 and 3 at the speed the LED is
> flashing at for as long as they are pressed.
>
> I think that's the best way I could find to put all the sensors at work
> :)
>
> Feel free to steal the code/move some of it to libraries where said code
> belong, and do whatever you please with the code :)
>
> I'm also attaching AikoDeviceButton.h/.cpp from the Aiko libraries with
> my code that makes them a bit more useful than stock :)

On the Aiko side, can someone submit my code for AikoDeviceButton.h/.cpp in
the upstream tree?

More generally, would it be cool to also include the longer Pebble hardware
stress example I wrote and attached?
(with the understanding that the code is not an example of how pretty you
can make it, and while it's fine to check it as is, some of its code would
also benefit from being checked in in library files).

Thanks,

Andy Gelme

unread,
Feb 13, 2011, 7:20:21 PM2/13/11
to arduino-...@googlegroups.com, Marc MERLIN, aiko-p...@googlegroups.com
hi Marc,

On 2011-02-14 05:08 , Marc MERLIN wrote:
> On the Aiko side, can someone submit my code for AikoDeviceButton.h/.cpp in
> the upstream tree?

Yes, I will do that.

> More generally, would it be cool to also include the longer Pebble hardware
> stress example I wrote and attached?

After the MobSenDat exercise ... I'm thinking that I should provide
clean separation between the core part of Aiko (platform, node, gateway)
... and specific applications (including higher-level examples).

Something along the lines of ...

- Aiko Platform (existing repository - but, just the core parts)
- Aiko Pebble (specifically for the Pebble hardware - a new project)
- Aiko MobSenDat (specifically for the MobSenDat hardware - was started
during LCA2011)

In which case ... "yes" it would be cool to add your example to the (yet
to be created) "Aiko Pebble" repository.

I'll get this sorted out.

--
-O- cheers = /\ /\/ /) `/ =
--O -- http://www.geekscape.org --
OOO -- an...@geekscape.org -- http://twitter.com/geekscape --

Marc MERLIN

unread,
Feb 13, 2011, 7:23:27 PM2/13/11
to Andy Gelme, arduino-...@googlegroups.com, aiko-p...@googlegroups.com
On Mon, Feb 14, 2011 at 11:20:21AM +1100, Andy Gelme wrote:
> hi Marc,
>
> On 2011-02-14 05:08 , Marc MERLIN wrote:
> > On the Aiko side, can someone submit my code for AikoDeviceButton.h/.cpp in
> > the upstream tree?
>
> Yes, I will do that.
>
> > More generally, would it be cool to also include the longer Pebble hardware
> > stress example I wrote and attached?
>
> After the MobSenDat exercise ... I'm thinking that I should provide
> clean separation between the core part of Aiko (platform, node, gateway)
> ... and specific applications (including higher-level examples).
>
> Something along the lines of ...
>
> - Aiko Platform (existing repository - but, just the core parts)
> - Aiko Pebble (specifically for the Pebble hardware - a new project)
> - Aiko MobSenDat (specifically for the MobSenDat hardware - was started
> during LCA2011)

Yes, that makes perfect sense.

> In which case ... "yes" it would be cool to add your example to the (yet
> to be created) "Aiko Pebble" repository.
>
> I'll get this sorted out.

Cool, thanks for that.

Oh, just to make sure, there is yet no code that talks to all the sensors on
the mobsendat and gathers GPS data at the same time. Correct?
(I know it was being worked on, just making sure I didn't miss it).

Reply all
Reply to author
Forward
0 new messages