I have connected an HC-11 wireless serial module to a MEGA board. The SET pin needs to be low to program the module. If I just connect the MEGA pin 13 (and digitalWrite LOW) to the module SET pin then I am unable to program the module (even though the pin 13 led is off). If I include a pulldown resistor then everything is okay.
I am only just starting with this stuff. Am I missing something?
This code works with the pulldown resistor, does not without.
int pinSet = 13;
int incomingByte = 0;
void setup() {
pinMode(pinSet, OUTPUT);
digitalWrite(pinSet, LOW);
Serial.begin(9600);
Serial1.begin(9600);
Serial1.println("AT");
delay(1000) ;
}
void loop() {
if (Serial1.available() > 0) {
// read the incoming byte:
incomingByte = Serial1.read();
// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
}
}