I'm try to build an application using a dust sensor sharp GP2Y1010AU and following this tutorial:
http://labs.arduino.org/Sharp+dust+sensor+GP2Y1010AU Sharp dust sensor GP2Y1010AU | Arduino Labs
Using an Arduino all works fine, but if I replace it with an Edison + arduino board (that teorically shoul be compatible 100% with arduino) the sensor read ever 0V.
There are some limitation with Edison board?
That's a weird problem because it is just an analog read and it should works. Are you using the code from the tutorial that you provided?
Personally, I would recommend you to test the analog input with another device (you can use a potentiometer to check if the values changes). And check IOREF and AREF headers are selecting the value 5 V (Check this document: http://www.intel.com/content/www/us/en/support/boards-and-kits/000006021.html).
Let me know when you have the results of the test to help you more.
thank for the answer. I tried with different sketch (one found on your tutorial) and changing analog IO on the board (that work correclty for other kind of analog sensor) and I have ever same result: an analog read about 0V.
I'm worried about the effective real.time of the Edison: to make a read with this sensor I have to set high/low a digital pin for few microseconds but the Edison is able to do that?
I tested the code of the Optical Dust Sensor from the tutorial that you provided without the sensor, I tested it with a potentiometer and a simple LED. I found that I wasn't reading any value on the Arduino's serial monitor because the function Serial1.begin(230400), it isn't supported, you have to use Serial.begin(230400) instead and I changed the Serial1.print() too.
At the beginning I connected the LED to the pin 6 and I noticed that the setting high/low the digital pin for a few microseconds was not working (it happens the same to the other PWM pins), so I changed the pin to 4 and it worked. So yes the Edison is able to do these changes.
I'm not sure if your analog pins are fine so I recommend you to do the same test that I did with a potentiometer and LED. Make sure that your LED pin is in a not PWM pin and you should get some values that are Non-Zero like me, look at this picture:
I'll be waiting for your results to be able to assist you better.
Yea: in the original project I already changed me too the serial and the baud rate.
I tried to change analog port, and effectively now I have some measurement. The measure is still not trustable: sometime works correctly, but sometime return again a number close to 0V. I will try in the next days to check with an oscilloscope in order to check what is the issue.
Ps. there are some know issues to set manually high/low state on PWM digital pins?
That's great, when you have the results of the oscilloscope just let us know to help you further.
About the PWM pins issue, I apologize because it was a problem with the Edison board that I was using, I tested the PWM pins of other Edison boards and they worked, so sorry about that.
We will be waiting for your reply, have a nice day.