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/
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,
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 --
> 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).