-
Hi @Gordon,
Is this (http://www.espruino.com/Reference) Javascript reference is the one which should be examined when writing code for Puck ? Where can I find the functions which are Puck specific ?
Thank you.
-
-
Hi Guys,
I would like to connect a solar cell to charge the Puck's battery. I think this could happen regularly checking the battery voltage using NRF.getBattery() and once it is below certain level to start charging from the solar cell. Is there a way to charge a battery through any of the pins ?
Thank you.
-
Hi Gordon,
Really appreciate your feedback and quick reaction! I will require an average frequency for 5 seconds every hour, as we discussed it could double decrease the battery life, but the Puck open architecture give possibility for additional power supply, everything is a matter of evaluation.
Thank you again.
-
Hi Guys,
I have a sound which is between 150Hz-250Hz. I need two things:
1) The average frequency of the sound for the last 5 seconds. After a discussion with @Gordon it appeared that 1Khz sampling rate will be enough and this could be done on the Puck with FTT.
2) Get the digitalized sound from the microphone for the last 5 seconds.The microphone is connected on D2(for analog), D1 (for power) and GND.
Thank you.
-
-
-
-
Hi Gordon,
Neither
packets=10; NRF.setScan(function(d) { packets--; console.log(d); // print packet info if (packets<=0) NRF.setScan(); // stop scanning });
nor
NRF.findDevices(function(devices) { console.log(devices); }, 1000);
return any results.
I guess configuring GATT server with the sample configuration does not start the server itself.
Another approach could be implementing a GATT server on Android.
-
-
-
-
-
-
Hi Guys,
Following code is deployed on Puck.
NRF.on('connect',function(addr) { NRF.disconnect(); });
nRF Connect application from Android is used to connect to the device.
Expected behavior: No client can ever connect to the Puck and is always disconnected.
Current behavior: On the first attempt, the client is disconnected. On the second attempt 3 leds (RGB) are ON for a second and then the client can connect. When connected back to the Puck, the current code to the interpreter is flashed.Current firware version is 1v91.
How can always disconnect clients and partially when unknown address is found ? (i.e. apply http://www.espruino.com/Puck.js+Security)
Thank you.
-
Hi Guys,
Movement detection code from above is uploaded on Puck with firmware 1v91, but it does not detect any movement. Please advice.
//7f:9a Motion detector code digitalPulse(LED1,true,1000); pinMode(D1, 'input_pulldown'); pinMode(D30, 'input'); var state=0; NRF.setTxPower(4); // Full Power advertising function motion(){ digitalPulse(LED3,true,100); advertise(1); } function reset(){ digitalPulse(LED2,true,100); advertise(0); } function advertise(pinState){ console.log(pinState); state = pinState; NRF.setAdvertising({ 0x2a00 : [state] }); } setWatch(motion, D1, {repeat:true,edge:'rising',debounce:100}); setWatch(reset, D1, {repeat:true,edge:'falling',debounce:100});
Thank you.
-
-
-
-
How can I read the advertised data above under "0x2a00" in android here https://github.com/googlesamples/android-BluetoothLeGatt/blob/master/Application/src/main/java/com/example/android/bluetoothlegatt/BluetoothLeService.java#L129 ?
Hi @Gordon,
Along with self-propagating code is it possible to do a firmware update if needed, avoiding user interaction ?
In my concrete case an Android phone interacts with multiple pucks, which will be really valuable to do both functionalities above.
Thank you.