Relay shield for arduino problems

Killerbee65

Joined May 15, 2017
243
Ok, I guess I cannot help here. Because of a known IDE bug, I’m sure that it’s not your cable. I have the same problem with the standard cable and if followed precisely, the steps I gave you solved my problem.

Are you using a clone? Just curious.

Good luck.
a clone?

djsfantasi

Joined Apr 11, 2010
6,792

The Arduino platform is open source. You can purchase many whose performance is unacceptable. I typically buy from Arduino directly or Sparkfun or Adafruit. I confirm that the Arduino is NOT a clone. After development if I need several, I’ll test my product on a clone.

If you’re an Arduino beginner, I can’t recommend buying a processor from anyone but Arduino.

Killerbee65

Joined May 15, 2017
243

The Arduino platform is open source. You can purchase many whose performance is unacceptable. I typically buy from Arduino directly or Sparkfun or Adafruit. I confirm that the Arduino is NOT a clone. After development if I need several, I’ll test my product on a clone.

If you’re an Arduino beginner, I can’t recommend buying a processor from anyone but Arduino.
I purchased it off of amazon, and I 90% sure it was from an alternative company

Killerbee65

Joined May 15, 2017
243
So the trouble shoot actually worked, its uploading now. but the serial monitor is not. According to the code the serial monitor should print out "t" when the program is functioning, yes? well mine does not and when i type in one of the listed commands it won't do what what described (f for forward but doesn't even move motor).

djsfantasi

Joined Apr 11, 2010
6,792
I purchased it off of amazon, and I 90% sure it was from an alternative company
That’s what I thought. I hope you recognize the effort I’ve put in to help you. And thus understand that I can’t help debug a clone.

In fact, your very last post indicates a problem with USB communication, which has been a problem all along. There is no guarantee you’ll get what you want when you use a clone.

Good luck. Perhaps someone else can help.

Joined Jan 15, 2015
5,646
So all of this brings us to? Intermittent upload problems aside everything like the code when it loads runs OK?

Ron

Joined Jan 15, 2015
5,646

The Arduino platform is open source. You can purchase many whose performance is unacceptable. I typically buy from Arduino directly or Sparkfun or Adafruit. I confirm that the Arduino is NOT a clone. After development if I need several, I’ll test my product on a clone.

If you’re an Arduino beginner, I can’t recommend buying a processor from anyone but Arduino.
Same, for the few extra bucks I am not going to lose any sleep.

Ron

Killerbee65

Joined May 15, 2017
243
That’s what I thought. I hope you recognize the effort I’ve put in to help you. And thus understand that I can’t help debug a clone.

In fact, your very last post indicates a problem with USB communication, which has been a problem all along. There is no guarantee you’ll get what you want when you use a clone.

Good luck. Perhaps someone else can help.
Thank you and I do.

Killerbee65

Joined May 15, 2017
243
So all of this brings us to? Intermittent upload problems aside everything like the code when it loads runs OK?

Ron
I'm not 100% certain the code actually work because I can't get it to upload properly but I can confirm that when I use "flags" like serial.println("code works here"). They do show up on the serial monitor and when I turn the led using W it does the action but as for what I want it to do, which is make the motor run, I cannot confirm.

Joined Jan 15, 2015
5,646
I did upload the last version of your code you posted and it uploaded fine but if you have something new post it and I'll try it. While I can't run motors or have a relay board I can see if the code uploads and behaves.

Ron

Killerbee65

Joined May 15, 2017
243
I did upload the last version of your code you posted and it uploaded fine but if you have something new post it and I'll try it. While I can't run motors or have a relay board I can see if the code uploads and behaves.

Ron
I didn't change much except for adding those flags I mentioned. Could you actually send a screenshot or short video of how the code behaves?

Killerbee65

Joined May 15, 2017
243
I think I figured out the problem. It's not the cable, its the shields themselves. I read online that if the tx and rx pins are occupied the code will not upload so I removed the shields and it worked. Even the serial monitor stared working because it displayed the commands and my flags but as soon as I reconnected the shield the serial monitor did nothing ( did not send or receive commands) and the "L", "tx", and "rx" nights did not blink or even illuminate when sending out a command when it did do those things prior to mounting the shields.

Joined Jan 15, 2015
5,646
That's right! I have had problems if I try to upload when I have the thing doing something on the comm port also. Yay on that note. Damn, I never gave that a thought either.

Ron

Killerbee65

Joined May 15, 2017
243
I think I figured out the problem. It's not the cable, its the shields themselves. I read online that if the tx and rx pins are occupied the code will not upload so I removed the shields and it worked. Even the serial monitor stared working because it displayed the commands and my flags but as soon as I reconnected the shield the serial monitor did nothing ( did not send or receive commands) and the "L", "tx", and "rx" nights did not blink or even illuminate when sending out a command when it did do those things prior to mounting the shields.

OK OK OK, progress. I managed to get all the boards on and still have the ardunio upload so my earlier prediction is wrong. I assume it might have just been the relay shield or a buggy energy shield. Anyways I connected it onto the car kit board and the piezo buzzer on the car started to blare a constant high pitched sound. I still can't confirm if the motor works or not but the serial monitor gave me a indication (my flags) that it should.

Joined Jan 15, 2015
5,646
Well further along than things were.

Ron

Killerbee65

Joined May 15, 2017
243

Joined Jan 15, 2015
5,646
OK, running your code it does work but... when we make lines HIGH for example when the code goes:
Code:
if(t == 'F'){ //move forward(all motors rotate in forward direction)
digitalWrite(13,HIGH);
digitalWrite(11,HIGH);
}
That works but nothing tells those lines to go Low. Eventually we just end up with four lines HIGH since nothing tells them to go LOW.
Code:
if (condition1) {  // do Thing A }
else if (condition2) {  // do Thing B }
else {  // do Thing C }
Ron

Killerbee65

Joined May 15, 2017
243
OK, running your code it does work but... when we make lines HIGH for example when the code goes:
Code:
if(t == 'F'){ //move forward(all motors rotate in forward direction)
digitalWrite(13,HIGH);
digitalWrite(11,HIGH);
}
That works but nothing tells those lines to go Low. Eventually we just end up with four lines HIGH since nothing tells them to go LOW.
Code:
if (condition1) {  // do Thing A }
else if (condition2) {  // do Thing B }
else {  // do Thing C }
Ron
But wouldn't the program automatically put those pins on low when you input another direction?

Joined Jan 15, 2015
5,646
No, because once we tell them to go HIGH they have no reason to change just because a few other pins joined them. The code works but just needs a little work.

Ron

Killerbee65

Joined May 15, 2017
243
Would adding "LOW" statement to the next else if do?

Ex:

If(t =='F') {
DigitalWrite (13, HIGH);
}
Else if(t == 'B'){
DigitalWrite(13, LOW);
DigitalWrite(12, HIGH);
}