So, after coming up with the Flow Control for serial communications and playing 
with the Arduino Uno for a couple of days I now have added the ability to 
present Commands and Arguments from LC to the Arduino Uno. This could have been 
where we were a few weeks ago if the read until EOF worked with the Uno and if 
we had more Buffer tools in LC. That said this is actually so much better than 
the MacBrick and previous versions of I/O boards.

Madness:
So I can read the Uno and send to the Uno and then now I can send commands 
w/args to the Uno. What can I do with it?

I know! I'll write a program that reads the brightness of the screen on my TV 
and since most Commercials are brighter than the show or movie I am watching I 
can determine if a commercial is on and turn down the sound for a minute or two 
and then turn it back up after the commercial. I take photoresistor readings 
and based on those look up the time and channel using EyeTV for the channel (TV 
is mirrored on pc) and the time from LC and the Tv Show that is on from 
TitanTV. I determine that the brightness should be a commercial via how long 
and how bright the screen is (very suspect code here) at this moment. And if it 
is a commercial then I use iRed and an irTrans blaster to turn down the volume. 
Now I wait until either the brightness gets darker (movie is back on) with a 
check every 30 seconds or a preset time passes and then turn the volume back 
up. I print to the screen in LC to let me know what show and time it is and 
that we think it is a commercial. I flash some LEDs and buzz a piezo to the 
tune of twinkle twinkle little star (since I can take the lack of noise now 
that the TV volume is down). Then the volume comes back up and we wait again. 
If I quickly change the channel up and then back down then I can also see that 
the TV was muted on my iPhone using eyeTV's iPhone app.

Well, since my code thinks most flashes are commercials and I have very bad 
timing issues on both the reading of serial data and with my logic code in LC 
the Tv goes up really LOUD and after a bit it goes down really low then up 
really LOUD and then down really low. That is why I call this Madness V4.2

But hey the next project is the fully autonomous lawnmower with remote control 
options via the iPhone, network, ethernet shield and motor shield which will 
serve double duty as an ice fishing shanty mover and GPS ice fishing spot 
locator.


-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgr...@comcast.net


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to