Pages: [1]   Go Down
Author Topic: 2 arduino's over serial  (Read 520 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello ,

I hav a small isue with i want to have some help with.
I have 2 arduino's , one is driving a dc motor with pwm , enable and directions .Also is there a encoder and a potmeter.
The other one is a remote control witch drives the motor using serial communication and there is also a I2C display attach to this arduino.
The motorarduino has 2 modes: mode one is a normal mode in witch you can drive the motor anyway you want. The second mode is the recordmode with is when you turn the potmeter from 0 to max the upc sets on certain values this value from the encoder in its memory.
When you go back to the normal mode and you turn the pot , the motor goes to these in memory values.
So far everything works well, but now i trie to do this all from the remote.There a have a problem , i use a switch case , with i recieve from the remote , this sets te motorcontroller in the nromal mode or in the record mode.This works wel but now i can't control the motor anymore .The program goes into his correct case , controled with a led , but i can't get any motor commands when the program is in the switch case.
When i use a serial print command afther the serial read, i see that the commands are getting there but not in het case part.

Can somebody help me with this?

Pages: [1]   Go Up
Jump to: