Hi!
I want to use the spi device, I only need to receive data from the slave, and the host does not need to send data.
I use the following code:
var s = new spi.SPI({ pinSCLK: 18, pinMISO: 19, pinMOSI: 23 });
s.transfer(Buffer.from([0x00, 0x00]), (err, data) => {
console.log(err);
console.log(data);
});
Always get the following result:
$ lowsync sync
Fetching file system listings...
Reminder: No password set! Please set one via the lowsync settings set web.password="..." command. Continuing...
Synchronization complete |██████████████████████████████| 100%
PC => MC: +File index.js
? Would you like to show the output of the microcontroller? (Use the --monitor command line option to remove this prompt and enable/disable showing of the output after sync.) Yes
Restarting program...
Starting monitor...
--- User program's output: ---
*** The connection has been lost. We will retry connecting to the microcontroller. In the meantime, please check your connection ***
*** The connection to the microcontroller has been re-established ***
*** The connection has been lost. We will retry connecting to the microcontroller. In the meantime, please check your connection ***
*** The connection to the microcontroller has been re-established ***
Hi! I want to use the spi device, I only need to receive data from the slave, and the host does not need to send data.
I use the following code:
Always get the following result:
thank you!