Arduino Forum

Using Arduino => Project Guidance => Topic started by: carbon_adam on Mar 06, 2013, 11:15 am

Title: analog connection between 2 Arduinos -not i2c or serial
Post by: carbon_adam on Mar 06, 2013, 11:15 am
I have 2 Arduinos, one for running accelstepper and the other for using firmata so I can send values from pc.  I did this because I was having a hard time getting serial communication to work correctly and have the accelstepper running at the same time.  So my thought now was to use the PWM out from one Arduino to analog in on the other.  I cant use i2c or serial, I guess the simplest way would be if there was some way for the second Arduino to read the pwm directly without having to make an analog to digital converter. 
has anyone done this before?  Any help links to something simple would be fantastic.
Title: Re: analog connection between 2 Arduinos -not i2c or serial
Post by: billhowl on Mar 06, 2013, 02:47 pm
How about using the VirtualWire lib but connected by hard wired.

Quote
VirtualWire
Interface Arduino to low cost RF wireless modules to provide high performance transmitters, receivers and transceivers for data. Circuit diagrams and documentation here (http://www.open.com.au/mikem/arduino/VirtualWire.pdf), download here (http://www.open.com.au/mikem/arduino/).

http://playground.arduino.cc//Main/InterfacingWithHardware#wireless (http://playground.arduino.cc//Main/InterfacingWithHardware#wireless)
Title: Re: analog connection between 2 Arduinos -not i2c or serial
Post by: HazardsMind on Mar 06, 2013, 02:51 pm
Quote
I cant use i2c or serial
What about softserial?
Title: Re: analog connection between 2 Arduinos -not i2c or serial
Post by: cmiyc on Mar 06, 2013, 04:15 pm

So my thought now was to use the PWM out from one Arduino to analog in on the other. 

Why bother with an analog in?  PWM isn't analog, it's digital.
Title: Re: analog connection between 2 Arduinos -not i2c or serial
Post by: pylon on Mar 06, 2013, 04:27 pm
Quote
I cant use i2c or serial


Why? Maybe we can solve that problem better than your suggested solution to it.
Title: Re: analog connection between 2 Arduinos -not i2c or serial
Post by: PeterH on Mar 06, 2013, 05:57 pm
What is the nature of the data you're trying to pass across? I suppose it's something that is ultimately represented numerically but what does it represent and how often does it need to be updated?
Title: Re: analog connection between 2 Arduinos -not i2c or serial
Post by: carbon_adam on Mar 06, 2013, 06:52 pm
actually anything that can let me get osc values to an arduino with 2 float values is all I need, it could be processing or pure data or whatever.  I was hoping for a simple pure data patch and a simple bit of code that I could integrate with the other code I have. I abandoned serial yesterday but I can see there are so many options for so many things that I need to stick with it and try and figure it out a little more.

I could use i2c or serial I just got stuck trying to make it work that i thought perhaps it would be simpler another way for a basic programmer(very basic). 

Title: Re: analog connection between 2 Arduinos -not i2c or serial
Post by: carbon_adam on Mar 06, 2013, 06:57 pm
and for discussion sake here is the other stuff im doing..not directly on the arduino its a chipkit32 and faster so I know as far as i can see that firmata wont work on it but simple serial stuff should..and im testing the serial for arduino anyway
Title: Re: analog connection between 2 Arduinos -not i2c or serial
Post by: PeterH on Mar 06, 2013, 11:25 pm
Sorry, I don't know what OSC values are, but a digital connection would be the most obvious way to go IMO and a simple TTL serial interface would be easiest and best if the Arduinos are within a few feet of each other. You seem to have ruled this approach out but I don't understand why - is there some philosophical objection?
Title: Re: analog connection between 2 Arduinos -not i2c or serial
Post by: pylon on Mar 06, 2013, 11:46 pm
Quote
and for discussion sake here is the other stuff im doing..not directly on the arduino its a chipkit32 and faster so I know as far as i can see that firmata wont work on it but simple serial stuff should..and im testing the serial for arduino anyway


You're mixing a lot of stuff, chipKit32 with Arduino, PWM with an analog signal, serial with I2C and firmata with OSC.

In your sketch you're using some analog value to control two stepper motors. If that's running on the chipKit32, what's the job of the Arduino? Do you have an overall description of your project to give us a picture of what you're trying to achieve?