Backround: I am trying to set up the logic to use an HC-05 as a controller. The aim is to send two command strings via the HC-05 to switch a pinout from LOW to HIGH. The RISING will trigger a time-stamp on a separate board.
My IDE is Arduino 1.8.5, running on Linux, Fedora28.
This probably isn't your problem, however, I would recommend changing whatever you are using software serial for over to hardware serial if possible as it may fix future problems due to not having interrupts with hardware serial on pin 0 and 1.
One thing to try: have you tried changing pin nine on the arduino to a different pin, say pin 8. It may be a problem with the arduino board itself.
Delta_G:
You've made some mistake in the wiring or the hookup. It's not the code. That code should blink both leds.
Okay, Delta_G. You are right.
I have just measured the voltage directly between Pin9 and GND. It is alternately running at zero or 4.94volts. Re-configuring the wiring lights up pin9. SOLVED.
Oh what a big lesson. These kinds of bugs - particularly circuit bugs - poor connections, etc - are costing me such a lot of time and heartache.
DH12043:
... I would recommend changing whatever you are using software serial for over to hardware serial if possible as it may fix future problems due to not having interrupts with hardware serial on pin 0 and 1.
One thing to try: have you tried changing pin nine on the arduino to a different pin, say pin 8. It may be a problem with the arduino board itself.
--DH
Hi DH.
Yes, I'm discovering that there are options with the basic configurations:
SoftwareSerial with RX[HC-05] directly into TX[Arduino]
SoftwareSerial with RX[HC-05] crossing a 1K/2K bridge to reduce its volatge to 3.3 at the TX[Arduino]
Hardware with RX[HC-05] directly into TX[Arduino]
Hardware with RX[HC-05] crossing a 1K/2K bridge to reduce its volatge to 3.3 at the TX[Arduino]
They all offer different opportunities/functions/risks. I am slowly coming to understand the differences. Too slowly!!
I think I will post a NEW TOPIC with that question.
Thanks for the idea. I will do what you recommend.
About switching pins. I did that, but it now seems that the common issue was my breadboard and its wiring.