Is it Possible?
A.C. fishing
Posts: 262
Is this possible, and how?
input from a temperature sensor will go to the BS2, and then up the Serial Cord, through the adapter and Make a graphic move?(I'm using Flash MX for the graphics and motion clips). How can the BS2 tell the rest of the computer the temperature, and load it in another program? Like if the temperature < 50 then the a = 1, temperature = 50, a=2, and if temperature > 50, a=3. But how can the rest of the computer use this?
Thanks
input from a temperature sensor will go to the BS2, and then up the Serial Cord, through the adapter and Make a graphic move?(I'm using Flash MX for the graphics and motion clips). How can the BS2 tell the rest of the computer the temperature, and load it in another program? Like if the temperature < 50 then the a = 1, temperature = 50, a=2, and if temperature > 50, a=3. But how can the rest of the computer use this?
Thanks
Comments
SensorData VAR WORD
SensorPin CON 2 ' Or whatever pin...
TxPin CON 16
MyBaud CON 16384 ' 9600 baud, inverted --
Main:
· GOSUB ReadSensor
· GOSUB SendData
· pause(1000) ' Wait 1 second
· GOTO Main
ReadSensor:
·· ' Stuff to put the sensor data in SensorData
RETURN
SendData:
· SEROUT TxPin, MyBaud, [noparse][[/noparse]DEC SensorData, 13]
· RETURN
Ok, now you program your PC (somehow) to read the serial port. Based on the value
read from the serial port, your PC (somehow, varies by language) updates the graphics.