1

I'm looking to send an ascii string over I2C in node-red to a Atlas Scientific pH I2C module.

I currently have tried using the node red contrib gpio and i2c. I am able to send the command r as ascii number 114 and get a response.
But when I try the command sleep it does not work.

I have tried to send it as an array, individual ascii numbers with delays, a string of numbers, all as one number, with null byte.

None has worked so far, the manual says that the commands consist of 5 parts.

Start-I2C address-Write-Command(ascii command string)-stop.

In the SDA and SCL diagram it shows,

address bit->write->ack->first letter of command->ack->......->last letter of command->ack->stop.

Am I inputting the data in the wrong format or is there a problem with the i2c node waiting for the ack before sending the next letter?

chemejon
  • 41
  • 5
  • Welcome to Stack Overflow! I've edited your question. I've added some newlines and paragraph breaks, which will hopefully make it easier to read. I also prefixed some lines with ">" to make them appear as quotes, which seems appropriate here. You can further [edit] this question if you want. You refer to a manual, if that manual is available online you might want to add a link to the relevant parts. Good luck, hope you'll get a useful answer! – S.L. Barth is on codidact.com Aug 09 '17 at 11:44
  • Glad to hear it! If you like, you can add the solution as an answer. It's OK to answer your own questions here. By telling us how you solved it, you may help future visitors with the same problem. – S.L. Barth is on codidact.com Aug 09 '17 at 15:15

1 Answers1

2

Formatting the command as a hex array through the function node worked.

[0x73,0x6c,0x65,0x65,0x70]

chemejon
  • 41
  • 5