Pages: [1]   Go Down
Author Topic: analog connection between 2 Arduinos -not i2c or serial  (Read 529 times)
0 Members and 1 Guest are viewing this topic.
Wien Austria
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

SG
Offline Offline
God Member
*****
Karma: 11
Posts: 500
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 86
Posts: 3464
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I cant use i2c or serial
What about softserial?
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6137
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I cant use i2c or serial

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

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12577
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Wien Austria
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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). 

« Last Edit: March 06, 2013, 12:55:32 pm by carbon_adam » Logged

Wien Austria
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

* robot_controlxy.pde (1.63 KB - downloaded 5 times.)
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12577
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1]   Go Up
Jump to: