A while ago I posted this post http://forum.arduino.cc/index.php?topic=369139.msg2544848#msg2544848
So I want to upload programs to an arduino using BT modules. I have now finally made a new shield for between my ethernet shield and my arduino mega.
The problem I am having is that I have found like 3 different circuits of bluetooth -> arduino connections for wireless programming. Everything was clear to me but one thing!
I don't know what to do with the arduino reset pin.
I made my shield according to this website: http://makezine.com/projects/diy-arduino-bluetooth-programming-shield/
In this circuit the arduino reset is connected to a voltage devide, providing a voltage at 3.33V, which is high enough to keep the arduino out of reset. And it is connected to Pin 32 of the hc-05 module via a 100nF capacitor, I believe that pin 32 is connected to the status led. When this module has a connection the LED is on and blinks off every few seconds (you can do that with the AT POLAR command).
The 2nd circuit I got from a reply on my previous post: http://i.solidfiles.net/4c042229f9.png . In this circuit I see that the reset line has a 10k pulldown connector and the reset is connected with a 100nF to the STATE button of the HC-05.
The pulldown resistor must be a mistake, other than that I learned that pin32 is connected to the STATE button on the bluetooth breakout board, well the LED shines a bit when I hold my multimeter on pin32 and the STATE button.
The 3rd circuit was also a reply on my prev. post: https://forum.arduino.cc/index.php?topic=348546.0 This one uses a NPN transistor to connect the arduino reset to ground. So any passed pulse on the capacitor would steer the transistor open, resetting the arduino?
With 3 different circuits, life was getting confusing :confused:
What I really just wanted to know is what one must do with the reset button and how does flashing a sketch in an arduino actually works. So I googled and found: http://playground.arduino.cc/Main/ArduinoReset
If you read the first 6 rules it becomes quite clear: When you reset an arduino, the first thing it does on power up, is running its bootloader. The bootloader checks if arduino IDE is flashing a new program or not, and the bootloader will then run whatever sketch is burned on its memory.
So if I understand correctly, prior to upoading a sketch over the TX/RX pins, the arduino needs a low pulse on its reset pin. I know from experience that sometimes you have to hold down the reset button manually untill IDE is done compiling, when the IDE says uploading sketch to board you have to release the reset button.
Knowing this confuses me even more, because the bluetooth module HC-05's LED is blinking continously when not connected, when it is connected it is also blinking only with a different speed.
My current assumption is the following: When the Hc-05 is connected the LED is burning and gives 2 low pulses every few seconds, in those few seconds the IDE has enough time to flash a new program in the arduino.
Questions: 1. If I connect the status LED via a capacitor to the arduino reset don't I reset the board with every blink of the BT module? 2. If the arduino boards gets a reset pulse at the moment the IDE is flashing a program in it, what will happen? 3. Which circuit will actually work.