-
Hi guys!
Wanted to do some coding with my kids, and tried latest Espruino on a Micro:bit (v2.00, DAPLink firmware updated). Basic things seem to work, but when I tried a simple neopixel write, it just hangs. Even
require("neopixel").write(D1, [255, 0, 0])
, it just hangs.Tried 2.19, 2v.18, 2v.14, 2v.11, 2v.08, same behaviour.
Did anyone use neopixels on the Micro:bit? -
-
Hi,
I have kind of edge case here, but maybe there is a solution: Using bunch of DS18B20 to measure temperatures, and bitbanged 1-Wire is not really working with Bluetooth enabled, so disabled it. But that means serial upload. Sometimes I get uart overflow error when trying to upload, sometimes it works just fine. Throttle send is set in the IDE is on, not sure if it helps.
Usually works on second-third try, but is there any trick that might help with the uploads? -
Btw, started working on a simple graphing solution like in the Micro:bit editor. Smoothie Charts, used by Micro:bit editor looks pretty nice for simple real-time graphing: http://smoothiecharts.org (MIT license)
Input lines either JSON, for example
{foo: 10, bar:15}
, or what the Micro:bit does:x:42
. Altho thinking about a prefix to either ignore certain lines, or process only certain lines. Could be a config options.
One graph per data stream, because Smoothie Charts doesn't support labels / legends, and your values can be vastly different.A small difference compared to Micro:bit: I would open a popup, so you can resize or place the graphs where you want.
Ideas, suggestions?
-
Nice!
What about optionally saving to localStorage, so you don't lose data if you accidentally close the tab, forget it, etc?
https://github.com/espruino/EspruinoWebIDE/pull/252 :) -
-
-
The Bangle is an existing smartwatch running custom firmware. DT No1 F18, looks like it's missing now from the manufacturer's site, but for example it's here too: https://www.smartwatchspecifications.com/Products/no-1-f18-sports-smartwatch/ the images show the stock firmware.
-
-
Updated to latest, app launcher works, but found and interesting glitch: just tried opening an app (GPS info for no particular reason), and after exited by long pressing BTN3, the screen was shifted half screen up:
https://drive.google.com/file/d/1hNbCu-m4OEqzd7PO-fJXu96iUlYn2H4o/viewIt's working, I can go into the menu, I can go up-down, but the screen is still shifted:
https://drive.google.com/file/d/1hK8wItlZx4tMQ_6a93I2BbeprTHgAXgQ/viewAnd can't restore it. After launching "About", the GPS info app still seems to overlay over it: https://drive.google.com/file/d/1he66IaaWtNG4l1fLN4xxhpH4manAsIUs/view?usp=sharing
But this is funny, the GPS info app itself is displayed fine: https://drive.google.com/file/d/1hkKc3vGJANWkKPzuofrEuXv1Uid0vQkc/view?usp=sharing
But the rest of the apps are shifted up, and widgets missing.
-
Something is not ok.
I was at ~2v09.30, and noticed the sliding and kitchen sink clock behaved strangely. I thought it's just a bit buggy :D But looks like not: now at 2v09.33, tried removing and reinstalling everything a couple of times, but the end is the same: Watch is displayed after boot, but if I try to open the launcher, the screen turns off, and can't get it back without reboot.
Oh, and while I can delete and upload apps, there is not progress on the display.
If I only have bootloader + morphing clock, pressing BTN2 shows "launcher not found" message. Pressing BTN3 turns off the screen, and can't get it back on.Reverting to 2v09.9 solved it (no particular reason for that version, just downloaded it previously to my phone).
-
-
That's better. I can only guess, but you are abusing that poor CR2032 battery, a couple of things come to my mind:
Battery itself. Do you test with the same battery? Or at least same brand, same state of charge? Might be simply the one with the MDBT42 breakout has less capacity, higher internal resistance, etc. Check the no-load battery voltage at least.
Battery holder and leads: Lead length can affect resistance and inductance. Might be enough for different behavior. Lead length from battery to the uC in case of the Puck is minimal, in case of the MDBT breakout I guess it's longer.Do you have an oscilloscope to check voltages? Or if you don't have anything better, just sampling the voltage with any uC might help to get more info...
Edit: a capacitor with smaller voltage rating, that would be physically smaller. And maybe even a low-ESR small-ish capacity one could help...
-
-
The
Vin
pin of the MDBT42Q breakout goes to a regulator, and that regulator drops some voltage (don't want to look up right now, but probably couple hundred millivolts). If you use a battery (for example the CR2032) that's less than 3.6V, connect it to the3.3
pin.And not exactly what you asked, but a motor - I assume it's running not only for milliseconds - even at 10-20mA is huge for a CR2023.
You should try somewhat bigger battery. Watch out for it's voltage! If it's below 3.6V, connect to the3.3
pin, if it's over that, connect to theVin
pin. For example, Li-ion, Li-poly must be connected to theVin
pin. LiFePo4, CR123A can be connected to the3.3
pin. -
Hi, you wrote you sample sensors every 300ms, unless the sensor is in some liquid or glued/bolted to something you measure, you create significant self heating (assuming it's a DS18B20 or similar). And IIRC unless you reduce the default resolution, sampling multiple sensors won't finish in 300ms.
And since you got
CALLBACK,MEMORY
errors as well, there might be a memory leak somewhere. Happens to everyone, I usually display or send free memory as well, so I can spot if there is any memory leak. Can you post your code? Just remove passwords :)The probably too fast sampling rate can lead to a memory leak, because you try to start a new measurement cycle while the first is still in progress. If that's the case, simply measuring slower could solve your problem (and reduce errors due to sensor self heating).
You can add some debug
print
s to your to the beginning and end of measurement withprocess.memory().free
to confirm that measurements don't overlap? -
I'm at 4600 steps, I did wear the bangle all night, but it's still only 8am, AFAIK I'm not sleepwalking, only had a breakfast and did some washing up.
Noticed the same 5-7 steps increase as HughB when twisitng my arm. Also when I twist my arm, and stop, and the counter goes up 2-3-4 steps while not moving at all (the watch is as stationary as I can hold it).
Installed 2v09.7 and the pedometer widget after Gordon's #5 post. -
-
-
Interesting, IIRC Espruino interpreter does "wake up" periodically, some timer runs out, it's documented somewhere. So short spikes in power consumption is expected.
Tested with an MDBT42Q breakout @ v.2v08.189, but my baseline is around 5~7uA (measured by an INA226 and Espruino) .When did you buy the Espruino and the Raytac module? Long shot, but maybe Raytac changed something in the module, and doesn't go as low power as earlier modules did? Got mine with the Bangle kickstarter. Or maybe you uploaded something earlier to the modules that changed fuse bits?
-
-
Have you connected anything to serial pin (D0 on MDBT40Q)? That would turn on the high speed oscillator and increase power draw.
Also, are you connected via BLE (or any phone or computer that may connect automatically)? You have to disconnect to actually shut off radio. -
-
I'm trying to write 16bit integers to a file, but didn't got the result I was expecting. For example:
>var d = new Uint16Array([255, 1111, 42]) =new Uint16Array([255, 1111, 42]) >d[0] =255 >d[1] =1111 >d[2] =42 >fs.appendFile("log0.txt", d) =true >var dr = fs.readFile("log0.txt") ="\xFFW*" >dr.charCodeAt(0) =255 >dr.charCodeAt(1) =87 >dr.charCodeAt(2) =42
\xFF
is 255, ok for one byte.
1111
is0100 0101 0111
in binary, andW
is 87 character code,0101 0111
binary. Looks like the lower byte of the 16 bit integer is saved.
*
is 42, ok.My question is: Looks like saving typed arrays directly is not supported. Will it be, or what would be the best way to save this data as fast and efficient as possible?
Board is a Pixl running 2v08.188 (and of course shouldn't call a binary file
.txt
)
Works with the latest edge build \o/
Thank you Gordon!