I try this arduino code with no results:
The arduino serial window print weird characters like "ÿ"... weird...I have the feeling the h4 doesn't response at all...
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
uint8_t my_serial_bytes[3] = {0x82, 0x00};
void setup()
{
Serial.begin(57600);
mySerial.begin(2400);
mySerial.write((byte)0x00); //first byte of registration sequence
}
void loop()
{
Serial.println("0x00 SENDS");
Serial.write((byte)mySerial.read()); //H4 is supposed to send '0x80'... but nothing occurs...
delay(10000);
Serial.println("0xA1 ENVOYE"); //part of registration sequence still...
mySerial.write((byte)0xA1);
delay(10000);
Serial.write(my_serial_bytes, sizeof(my_serial_bytes)); //send PLAY command to H4N... but still nothing occurs...
Serial.println("PLAY");
delay(30000);
}
thanks for your response UKHeliBob !
pin 10 is connected to RX of h4n
pin 11 is connected to TX of h4n
gnd of arduino is connected to ground of the h4n
gundorf:
"The protocoll is RS232 at 3.3V with 2400bps 8n1" from the site...
this maybe my issue...
It is almost certainly the issue with the h4n as the Arduino does not output RS232 level signals for which you need a converter. However, it does not explain why you get strange characters on the Serial monitor.
Maybe I'm wrong, but I am trying to do the same on the H2n and the projects that I have seen don't use any converter so maybe I'm thinking that a converter must be on the remote itself, or maybe is not an RS232?
Bit late here :o but if anyone has stumbled upon this and is still struggling...
The remote signalling is NOT RS232, it is plain 3.3V TTL so you can just hook up an Arduino (as long as it's 3.3V logic based!) or a USB to serial converter and your away.
Here are some links to more information - GitHub issue.
Yes, a lot of time is passed but in the end I've discovered that was a simple serial connection and I was able to reverse engineer the messages generated by my H2n remote and to use them on the recorder like the guy did on the links that you've posted