Bluetooth "when connected" command? #5598
Replies: 1 comment
-
Posted at 2017-02-09 by @gfwilliams So this is an Original Espruino board with Bluetooth installed? I'm afraid the bluetooth module (HC-05 / HC-06) acts as a simple serial port - so there's no file transfer or even connected/disconnected event. You'd have to add a bit of software on the Mac to receive the file. It shouldn't be too bad for example if you have it send the string You can then make a sendfile function on Espruino -something like:
Then your code only has to write everything it receives to a file until it gets the characters Posted at 2017-02-09 by BootySnorkeler Thanks! Posted at 2017-02-10 by @gfwilliams
Yes, that's the idea. You can move the Espruino console away from |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-02-09 by BootySnorkeler
Hi,
I'm planning to make a datalogger with my espruino with a dht11 sensor.
I want to make it so that If I connect my mac to my espruino via bluetooth, which will be on my windowsill, the espruino will send me all the logged data through a text file.
Is this possible?
Is there a command/keyword that triggers when bluetooth is connected?
Also a command for sending files by bluetooth?
I checked the reference page but I can't find any.
Thanks!
by the way here's my code so far:
yeah I'm a noob so please point out any errors in my code please!
Beta Was this translation helpful? Give feedback.
All reactions