View Full Version : transmitting data from photo to bridge board
skisca951
04-01-2009, 02:55 PM
How do i transmit the displayed data that i get on the Photo Board to
the Bridge Board?
For example, I currently have the Photo board on "DarkDetector" as
device image, how do i configure the protoboard and bridge board so that
the LCD's on the photo bard and bridge board display the same value?
kbanks
04-01-2009, 04:39 PM
Nodes send data to each other using RPC calls
In your "secondary" node (the one that is being told the value to display), put a function like:
def reportReading(value):
display2digits(value)
In your "primary" node (the one that is actually taking the readings), do something like:
value = xxxxxxx # get the value somehow
display2digits(value) # puts the value on MY seven-segment LED
rpc(otherNodeAddress, "reportReading", value) # and on the OTHER one
mcastRpc(1,1,"reportReading",value) # alternate method
Note that if you use the multicast method, ANY nodes within one hop (look at the second parameter) that have a function named "reportReading" will receive those values.
BTW, general questions should really be posted in the "Support Questions" category... This category is meant for posts that INCLUDE useful completed scripts that you want to share.
skisca951
04-17-2009, 02:19 PM
So for the primary node, I have the Photoboard
and the script I am using is DarkDetector.py. How exactly would the def. code look like in which I could insert that into DarkDetector.py.
The secondary node is the Bridge Board, is there a specific script file i should upload to it and just input that code from the last thread?
kbanks
04-20-2009, 08:25 AM
Take a look at script buzzer.py for an example of one script providing a service to another. You are wanting to do something similar, except you are wanting a node to provide a "display service" instead of a "buzzer service".
vBulletin® v3.7.5, Copyright ©2000-2010, Jelsoft Enterprises Ltd.