Go Down

Topic: analog connection between 2 Arduinos -not i2c or serial (Read 730 times) previous topic - next topic

carbon_adam

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.

BillHo

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, download here.

http://playground.arduino.cc//Main/InterfacingWithHardware#wireless

HazardsMind

Quote
I cant use i2c or serial
What about softserial?
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

James C4S


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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

pylon

Quote
I cant use i2c or serial


Why? Maybe we can solve that problem better than your suggested solution to it.

PeterH

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?
I only provide help via the forum - please do not contact me for private consultancy.

carbon_adam

#6
Mar 06, 2013, 06:52 pm Last Edit: Mar 06, 2013, 06:55 pm by carbon_adam Reason: 1
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). 


carbon_adam

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

PeterH

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?
I only provide help via the forum - please do not contact me for private consultancy.

pylon

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?

Go Up