Hi guys,
I am very new to arduino and would like to use my arduino nano to view wind speed data from an Eagletree Airspeed microsensor. I really am not sure where to with the coding. I would greatly appreciate some code to make this work or some advice on where to start.
Thank you very much!
I found the I2C address on my to be 0x75 NOT 0xEA. When I changed that in the first of the two sketches in the StackExchanged referenced above, it worked. I further edited as below:
/*
* note that timing is critical - see delay (5)
* and bps set to 115200
* works ok, but clean up 5-19-2019 jaf
*/
#include <Wire.h>
#define AIRSPEED_ADDRESS 0x75
#define WRITE_BIT 0x00
#define READ_BIT 0x01
void setup() {
Wire.begin();
Serial.begin(115200);
Serial.println("Program started");
}
void loop() {
byte data[2] = {0};
int i = 0;
Wire.beginTransmission(AIRSPEED_ADDRESS);
Wire.write(WRITE_BIT);
Wire.endTransmission();
Wire.beginTransmission(AIRSPEED_ADDRESS);
Wire.write(0x07);
Wire.endTransmission();
Wire.beginTransmission(AIRSPEED_ADDRESS);
Wire.write(READ_BIT);
Wire.endTransmission();
Wire.beginTransmission(AIRSPEED_ADDRESS);
Wire.requestFrom(AIRSPEED_ADDRESS, 2);
data[0] = Wire.read();
Wire.endTransmission();
Serial.println(data[0]);
delay(5);
}
This runs fine on a Nano.
@Jferguson4
This works great! I do have another question. Do you know what units this is outputting? Static I am getting values of 50 and when I put a Hair Dryer to it I see 120. Hoping to simply convert this to MPH.