Author Topic: Arduino sending analog data to IOBridge  (Read 769 times)

scoopjones

  • Newbie
  • *
  • Posts: 5
Arduino sending analog data to IOBridge
« on: July 04, 2010, 01:34:33 AM »
   I've been tinkering with a high-altitude wind gauge that I want to link to a web site and provide a chart of wind speed data via IOBridge. I have an Arduino doing the pulse counting and calculations for the wind gauge, and I want to send the MPH numbers over to the IOBridge to shoot it up to the web site. What would be the best way to do this? I tried an "analogWrite" to have the Arduino send a voltage value to the Analog In on the IOBridge channel, but the Arduino it turns out doesn't create a voltage, it sends a series of +5V pulses, much faster for higher values written to the port. That doesn't work for the IOBridge, unless I can count the number of pulses per second, every second. I suppose I could try an Ethernet board and bypass the IOBridge, but I'd like to keep the web site all in one system. I was hoping IOBridge would add a pulse frequency feature, not just a pulse counter, but I guess that didn't happen. Any ideas would be appreciated. Thanks!

Evan

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 669
    • ioBridge Support
Re: Arduino sending analog data to IOBridge
« Reply #1 on: July 04, 2010, 02:40:13 AM »
I ran this sketch on the Arduino to the IO-204.

http://www.arduino.cc/en/Reference/AnalogWrite

I replaced the LED with the Analog Pin on the IO-204. The IO-204 reads the analog value correctly. As I adjust the pot the analog value is updating form 0 to 1023.

I would make sure the grounds are connected from the IO-204 to the Arduino.

Let me know what you find out.

I will keep digging in the mean time.

ioBridge Support
Community Team

nick

  • Full Member
  • ***
  • Posts: 174
Re: Arduino sending analog data to IOBridge
« Reply #2 on: July 05, 2010, 12:45:25 AM »
Get a serial smart board and connect it to the UART on the Arduino.  Use the serial web services API to upload your data. You could either use a GET command to send it to your own website, or the DATA_LOG command to put it into an Iobridge data log.

Nick

scoopjones

  • Newbie
  • *
  • Posts: 5
Re: Arduino sending analog data to IOBridge
« Reply #3 on: July 06, 2010, 12:33:23 AM »
Thanks, I read the article on the Arduino site, and I think what I was doing wrong was assuming that analogWrite uses the analog pins, which it apparently does not. I'll try it that way and see if I can get a result. Thanks again.

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 669
    • ioBridge Support
Re: Arduino sending analog data to IOBridge
« Reply #4 on: July 06, 2010, 01:26:12 AM »
Yes, it definitely uses a a Digital PWM pin. 3,5,6,9,10, or 11 on the Arduino can all use analogWrite on a Digital I/O pin).

I think you will get it working now.
ioBridge Support
Community Team