-
• #2
The easiest is probably just:
function update() { var data = [ analogRead(D2)*255, analogRead(D3)*255, analogRead(D4)*255, analogRead(D5)*255, ]; NRF.setAdvertising({},{ manufacturer:0x0590, manufacturerData:data }); } setInterval(update, 3000);
-
• #3
Gordon
Thanks to help me! Today i compiled your ESPRUINO to NRF51822 (a chineses beacon) and run it. I can see with your WEB IDE the NRF51822 after scanning. Wheni try to connect say "CONNECTING" and nothing happens! Any tip ? Thanks!!!!!!!! -
• #4
Which board file you started with?
I tried a the Micro:bit firmware on a Xiaomi humidity sensor with nRF51822, and did work at first try.
What kind of beacon? Can it provide enough energy to the uC? Although a single coin cell should be enough, but still... -
• #5
Hummm, good tip to use the Micro:Bit firmware :)
I will compile with that! Did you compile it ?
I used this attached!I had gave up to use the ESPRUINO and choose Nordic SDK C where i make work the NRF51802 and NRF51822.
But, now! I want to back to ESPRUINO!!!! Much better! I will test soon and thanks AkosLukacsPatreon
And thanks gordon!
1 Attachment
-
• #6
Worked!!!!!!!!!!!!!!!!
Btw, is there any example to read the Battery value without create a SERVICE on ESPRUINO ? btw, i dont want to make a conenction to read the Battery, i want it during broadcasting...
-
• #7
There is an official downloadable build for the Micro:Bit https://www.espruino.com/Download
I used that first with the 51802, and after that built my own with (removed the microbit specific code).
Here is the thread with more info: http://forum.espruino.com/conversations/333666/ and the board file: https://gist.github.com/AkosLukacs/d37aa8663943dbd976279fc4cfa7c785 -
• #8
WOW!
thank you so much -
• #9
Sat 2019.09.28
'is there any example to read the Battery value'
Note: This is only available in Puck.js devices and Pixl.js boards
See link:
'How do I measure battery voltage on devices that don't have E.getBattery?'
gordon
Is there some Espruino example that sends Advertising of state (for example) of 4 analog inputs each 3 seconds ?
In meantime sleeps ?