1

I have problem with to the raspberry's usb serial tx direction.

I use npm's serialport software with node.js.

If I plug the usb cable (max232) with windows to serialmonitor, I can see the hex code (what I send from raspberry). But when I plug the cable between to pic and raspberry, I must fire several times transmission before I can see results.

I use node buffer:

e.g in the port.open function

const orangeLedOn = Buffer.from('55', 'hex');
const orangeLedOff = Buffer.from('50', 'hex');

port.write(orangeLedOn);
  1. pic uart works with the cable and between the windows serialmonitor, I can see result immediately

  2. I can see hex code what I send from the raspberry to serial monitor directly first transmission.

I think the problem is the node buffer, but I don't know how i will solve this.

cezar
  • 11,616
  • 6
  • 48
  • 84
Jdoe
  • 21
  • 2

0 Answers0