-
Thanks @allObjects
:-) it was up and running when the issue occurred and had been for days. The connects had been in place for a number of days. -
:-) yes a unique ff:ff:.. Mac address @parasquid....
It's going within the cabin of the vehicle so no issue with waterproofing and a screen is why I purchased it.
The screen shows normal vehicle battery voltage and also the voltage of the leisure battery so that's really useful when I'm using the fridge, lights etc especially when 'off grid' for a few days. I may find that I prefer my web page display of the data anyway.It's all a bit of plotting and playing at the moment as I'm also looking to switch some internal lights.
I've just purchased a Puck and also a Mirco:bit.Thanks
Steve -
Wow thanks @Gordon.
Erasing unerasable data.... Interesting.
I'm pretty convinced it wasn't out of range voltage as the device had been running for days, unless a reflash somehow directed voltage in an unusual direction
I'll make sure I flash the device when the Pixl.js is not connected to any sensors.
Thanks for the support and I'm semi glad it stumped you because it fuddled my brain.
-
Hi @Gordon, sorry, bear with me I'm trying to get my head around a number of things.
I hadn't appreciated that the earlier post was a new version.That's done the trick. Flashing now succeeds.
Steve -
Thanks @Gordon interesting reading.
I've tried the 'save to flash' method but get
>Uncaught Error: Module Storage not found at line 1 col 18 require("Storage").write(".bootcde","var on = true;\nfunctio...
Bizarrely enough the same code that was failing this morning to save() once sent to RAM isn't now erroring.
Thanks
-
Hi, If I send code to the device's RAM (2v07.14) then enter save(); I get an error message stating that my code is too big to save to flash.
The error message doesn't appear when using 2v06.The code is simple and is....
var on = true; function setP() { if (on) { digitalWrite(D4,1); on = false; show("1 1\n"+ " 1 \n"+ " 1 \n"+ "1 1\n"+ " 111 \n"); } else { digitalWrite(D4,0); on = true; show(0); } } setWatch(function() { setP(); }, BTN1, {repeat:true, debounce:20, edge:"falling"});
Details of 2v07.14
2v07.14 (c) 2019 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate > >save(); =undefined Compacting Flash... Calculating Size... ERROR: Too big to save to flash (2358 vs 2048 bytes) Deleting command history and trying again... Code is too big to save to Flash.
I've worked out that the code isn't minified on the device.
Is the ~2k flash for both firmware and code?
Thanks
Steve -
-
Hi @Gordon, I'm not sure now whether this is the right place to post but I'll give it a go.
That's started to work well now.
If I write a simple bit of code and set the WebIDE to flash I get a an uncaught error.
If I send to the device's RAM then enter save(); I get a fuller error message stating that my code is too big to save to flash.The code is simple and is....
var on = true; function setP() { if (on) { digitalWrite(D4,1); on = false; show("1 1\n"+ " 1 \n"+ " 1 \n"+ "1 1\n"+ " 111 \n"); } else { digitalWrite(D4,0); on = true; show(0); } } setWatch(function() { setP(); }, BTN1, {repeat:true, debounce:20, edge:"falling"});
My code is ~300 bytes.
If my understanding of http://forum.espruino.com/conversations/346537/#comment15336682 is correct then I should have 262144-260096 ie 2048?>process.memory(); ={ free: 267, usage: 33, total: 300, history: 8, gc: 0, gctime: 3.02124023437, blocksize: 12 , stackEndAddress: 536884560, flash_start: 0, flash_binary_end: 258940, flash_code_start: 260096, flash_length: 262144 }
Thanks
Steve -
-
-
Hi, thanks @Gordon I've got he email so I'll arrange to send it back.
so -B2 in the junction box is definitely GND, and is also -B1
It's
-B1
and+B1
and+B2
Thanks. Problem tracing is part fun part patience....
Steve
-
Hi @Gordon
is there any possibility that you could have got 12v onto the IO pins
at any point?I can't see how that could have happened.
I've drawn a schematic. The van is a campervan with all appropriate fixtures and fittings.
The electrics (USB/ leisure battery/charger etc) was fitted as part of the conversion done by athe company that did the conversion.I pulled all grounds together on my breadboard ie
1 from Pixl
1 from each ina226
1 from the vanI've not put the lines in for SCL/SDA as it just clutters the drawing.
The INA226 have to measure everything relative to GND so if you
connected each one to GND of each battery, then connected the
batteries in series for 24v, one of the INA226 could have been at 12v
relative to the Pixl. Does that seem possible?
Not that I can see.What confuses me is that the setup had been working for days without issue. I'd stopped / started it a number of times.
Is it possible the reboot (due to revised code) caused the problem?The DS300 is the CBE distribution box. +B1 and +B2 are the leisure and normal van battery.
Thanks -
-
-
-
Hi @Robin. I'm not entirely sure I got your last post, sorry if I got the wrong end of the stick.
The Pixl was running fine, I sent a tweak of the code over the the Pixl and it then failed to connect using the WebIDE. I checked the physical device and nothing was being displayed on the LCD (I've checked the LCD ribbon).
I've tried different power supplies / batteries without success.
The WebIDE doesn't display my specific device when I attempt to connect.
Web Bluetooth doesn't find my device when the dialog appears and I've tried on a couple of devices just in case it is a problem with my laptop.Thanks
-
-
Hi, the board is powered by the van's USB outlet so the 12v is only on each ina226.
I've attached the IDE log. The only thing that I can see is the end of my code, some control characters then a log error.
console.log(btoa(output.substr(i,384)));\\n}\",3072);\n\u0010\u001b[5dload()\n\n" Splitting for reset(), delay 250 BT> SEND ERROR: NotSupportedError: GATT operation failed for unknown reason.
I'm using Windows 10. I've tried the Pixl using a number of USB outlets/plugs. When it is plugged in nothing appears on the screen (at all). I've tried using my phone to see if BLE is running but the screen isn't displaying anything, again nothing being detected.
Thanks
-
Hi, I've had my code running on my Pixl.js none stop for a couple of days and it's been working fine for a couple of weeks. It is connected to 2 ina226 and has been merrily monitoring voltage of 2x 12v Campervan batteries.
I've got web page that pulls data from the Pixl when I click a button and draws a graph. Everything has been hunky dory.
But, I just flashed a tiny tweak to the board (changing the interval variable). I wasn't sat next to my Pixl but couldn't connect. I looked at the board and nothing was being displayed.
I've checked the power leads etc but I'm not getting anything out of my board. I've tried disconnecting the ina226 boards, still nothing.I haven't cooked it I am convinced.
As you can guess I'm a bit gutted at the moment.Any help will be gratefully received. I've got a Puck on order as I love these devices..
Thanks
-
Thanks @Gordon that'll do nicely.
-
Hi, the contents (as in table of contents) disappear when I look at http://www.espruino.com/Reference with my phone.
I often have a ferret about when out and about waiting for my daughter.Any chance of a tweak to make it more responsive when using smaller form factor devices?
Thanks.....
-
Thanks @allObjects....
At the moment I don't know the maximum watts I will have and to an extent that's the object of the exercise. It's 12v so I guess I may have quite high current at some points.
I can start small and build....Some of the terms are new so I'll catch on eventually... eg high = positive.
-
Thanks @AkosLukacs. I'd already investigated voltage dividing.
I've purchased 2 x INA226 modules so I can get something up and running.
Thanks.... Interesting read. I want to record some data so the DCDC ... LCD screen isn't quite right for me.
If anyone knows of something better than an ina226 then that would be brilliant to hear about.
Thanks