Go Down

Topic: Connecting to Flash (Read 376 times) previous topic - next topic

bri0

Need some help with my EMF detector
Yesterday at 20:56:56 | Modify | Remove  Im a student of graphic design in Detroit, and i could really use some help.

*disclaimer* im SUPER new to using Arduino but i have doing a lot of reading.

So i found this project : aaronalai.com/emf-detector <----- real cool
- I built it and thats all gravy

The problem: I wanna be able to read the EMF signals in flash using the NETLab Widget tool kit (analoginput). I THINK I i need to add something to the sketch because none of the data is making it to Flash.

WHAT IM USING:
-Arduino (sketch app)
-NETLabHub
-NETLab Toolkit AS3 Widgets
-Flash CS4


THE CODE IM USING NOW:

int inPin = 5;             // analog 5
int val = 0;                 // where to store info from analog 5
int pin11 = 11;         // output of red led

void setup() {

Serial.begin(9600);

}

void loop() {

val = analogRead(inPin);                    // reads in the values from analog 5 and
                                                                 //assigns them to val
if(val >= 1){
 
  val = constrain(val, 1, 100);               // mess with these values                                      
  val = map(val, 1, 100, 1, 255);        // to change the response distance of the device
  analogWrite(pin11, val);                    // *note also messing with the resistor should change  
                                                                 // the sensitivity
 }else{                                                     // analogWrite(pin11, val); just tuns on the led with
                                                                // the intensity of the variable val
  analogWrite(pin11, 0);                     // the else statement is just telling the microcontroller
                                                               // to turn off the light if there is no EMF detected
}

Serial.println(val);                                // use output to aid in calibrating

}

CHEERS - THANKS FOR YOUR TIME

PaulS

Flash is a licensed product. It's expensive. Very expensive. Proprietary format, too.

Using it in combination with an inexpensive, open sourced product like the Arduino seems wrong, somehow.

Anyway, not a lot of people use it, so you may not get a lot of help here. Just so you know.


Go Up