Pages: [1]   Go Down
Author Topic: AS3Glue: Send commands to OneWire Thermometer  (Read 1725 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I am trying to get the Dallas Semiconductor DS18B20 Digital Thermometer ( to communicate with Flash AS3 via the AS3Glue protocol and Firmata 2.0.

For those of you who may be a bit fuzzy about this, here's a quick breakdown.
OneWire is attached to an Arduino Digital Pin
Firmata 2.0 is on the Arduino
The Firmata sends data to Flash via the SerProxy application
Flash communicates with Firmata via the AS3Glue library

Sooo... In Flash, I am trying to send "ds.write(0xBE);" to the OneWire using something like the arduino.writeDigitalPin () function. :-?

The working arduino code has this main bit: (The full code is attached.)

  ds.write(0x44,1);         // Start Converting Temp Data

  present = ds.reset();;  
  ds.write(0xBE);         // Read Temp Data

  for ( i = 0; i < 9; i++) {           // we need 9 bytes
      data[i] =;

In flash, I have this (doesn't work...yet):
var timer6:Timer = new Timer(600,1);
var resetT:String = "ds.reset()";
var startConversion:String = "ds.write(0x44,1)";
var getConversion:String = "ds.write(0xBE)";

function setUpTherm (e:Object):void {
    timer6.addEventListener("timer", getTemp);

function getTemp(e:TimerEvent) {
    for ( i = 0; i < 9; i++) {           // we need 9 bytes
        data[i] = arduino.writeDigitalPin(8,(""));
    temperature.text = CTemp.toString();                                                  

This taps into a bigger question of how to send info to the digital pins from Flash using more than just HIGH or LOW commands.

Please throw in your 2 cents!! Thanks so much!!


Pages: [1]   Go Up
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines