-
It seems that as of 2v04.319 on both Linux and original Espruino Board 1.3, an undefined
variable does not result in a "UncaughtReference Error" message.___ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v04.318 (c) 2019 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate >d Uncaught ReferenceError: "d" is not defined at line 1 col 1 d ^ >
____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v04.319 (c) 2019 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate >d >
-
@Robin Thanks for the pointers. I did have a bit of trouble with that bit.
-
@Gordon I finally got time to implement your suggestions and the results were all consistent with a clock that is running way too fast so I tried it on a second Espruino board and the code worked fine.
No errors on load() except the occasional I2C bus confusion from the previousI think this particular board may just require a longer delay for the LSE clock to settle down as it works once powered and then the reset button pressed.
This is probably due to borderline capacitance on the 32.768KHz crystal circuit (which I had added).
So, it appears that resetting the time and then immediately creating intervals does work.
Thanks,
Jamie -
Hi,
The following (much cut down) code works fine when uploaded from the IDE but after using save() and power cycling it appears as if setInterval has no effect. The LCD and clock then update as quickly as possible (the clock goes through a day in about 6 seconds).On power-up or after using load() it exhibits this problem.
However, if I then press the physical reset button or use E.reboot() from the IDE it will run properly.I may just be that I'm not setting things up properly for using save() with setInterval (I rarely use save).
This is on an original Espruino board with added 32.168kHz crystal.
Firmware is version 2v03.21 but with some fonts compiled in.Any ideas?
Thanks,
Jamielet data_rec = Array(7) let lcd = undefined let Tmin = undefined let Tmax = undefined function LCD_init(spi) { let lcd = require("PCD8544").connect(spi,A6,B0,B1, function() { lcd.clear() lcd.flip() } ) return lcd } function LCD_update() { lcd.clear() let d = new Date().toISOString() // split the datetime string to fit the screen lcd.drawString(d.split('T')[0].replace('-','.').replace('-','.'),0,0) lcd.drawString(d.split('T')[1].split('.')[0],50,0) // update display with data lcd.drawString(data_rec[6],20,20) lcd.flip() } function data_update() { // updates the data_rec with data from other sources data_rec[6]=analogRead(C1)*3.3*3/2 } function onInit() { clearInterval() clearWatch() // initialize the rtc from the DS3231 I2C1.setup({sda:B9,scl:B8}) rtc = require("DS3231_J").connect(I2C1) let t = rtc.timeArray() setTime((new Date(t[0],t[1]-1,t[2],t[3],t[4],t[5],0).getTime())/1000) data_rec = [new Date(), 0,0, 0.0, 0.0, 'K', 1, 0.0] // initialize the LCD SPI1.setup({sck:A5, mosi:A7}) lcd = LCD_init(SPI1) setTimeout(function() { setInterval(LCD_update, 500) }, 1000) // timeout used here to allow for the initial data reading to complete setTimeout(function () {setInterval(data_update,1000)}, 1500) }
-
-
@Gordon "wrong code received" came from the CSR software off the CD that the dongle came with. I have removed all that and it now works very well using the built in Bluetooth.
-
FWIW I tried a Win 10 64-bit laptop with a built in Bluetooth radio (Intel) and it didn't see the Puck. So I disabled the built in Bluetooth radio and tried a CSR 4.0 dongle. The CSR saw the Puck but would not work past that point ("wrong code received").
I then removed the CSR drivers and re-enabled the built in Bluetooth radio and the Puck still could not be found but it now it does show up in Device Manager and the standalone web IDE just works fine. -
-
@Gordon - the link is broken but I have rebuilt the latest pulled version here.
Works on three Espruino 1v3 with the LSE running and also with the finger stopped LSE.
These boards all have a 32K crystal but I will try it on a bare 1v3 later.
Thanks again. -
With 1v87 it appears that holding my finger on the crystal leads actually STOPS the LSE from starting up, possibly because it does not detect the crystal.
With 1v88 it seems to detect the crystal and attempts to use the LSE even though it hasn't started up.
Checked with peek32(0x40021020), RCC_BDCR register, after reset.
-
@Gordon
Yes, even with the new firmware.
I've tried it with 7pF caps on (the closest I have at the moment) with the same result.Espruino 1v87 (using the binary from the website) has started up fine so far after numerous unpluggings etc. It reverts to start up problems when 1v88 is flashed on again.
Also, with 1v88 loaded the web ide has trouble connecting:
something like "Can't find STM bootloader"Edit: An Espruino 1.3 without a crystal works fine with 1v88.
-
Further to this; after leaving the boards powered down for some time they again did not reset properly.
As mentioned I have 32.768kHz crystals connected to these three boards but I do not have the 12pF caps mounted since they all worked fine without them.
However, if I hold my finger over the 32.768kHz crystal leads they do reset properly and also reset properly if left powered after the initial successful boot.
So it seems they may now require the capacitors. I will update this post when I dig up some appropriate caps.
-
-
Flashed the 1v88 version onto several original Espruino 1.3 boards resulting in just the red LED on reset.
One worked on reset but reverted to the red LED when powered down and then back up again.I tried it with both the web IDE and command line.
1v87 works on all the boards.
1v88 works fine on the PicosJamie
-
If the Olimexino is required then you can improve it replacing the micro.
I have recently replaced the STM32F103RBT6 with:
STM32F103RET6 (512k FLASH, 48K SRAM)
STM32F103RGT6 (1M FLASH, 96k SRAM).
In our case the the device is designed for a Arduino to be plugged in but I prefer to develop and test with the Olimexino (compatible sockets) and Espruino (because it is sooooo much nicer).
Newer devices will use a proper Espruino or Pico.
Jamie -
@Faldrian Just a note to say I that have two of the Adafruit CC3000 modules. One of which worked fine for several months and then started to act as yours does:
works ok for a few minutes when first powered up but then gets quite warm and no longer responds.
The second one works fine in the same circuit and same code.
An original Espruino board and v1.79 (I think).
Jamie -
-
-
-
-
-
Just tried @DrAzzy 's build. It loads and boots up fine but has the same issue with intervals as discussed here http://forum.espruino.com/conversations/261325/
So I guess the build environment is at least the same. -
Yes, @user51876 is correct. This occurs on both the Olimexino (12 bit vars) and the MapleRET6 (16 bit vars). Also, as @DrAzzy suggests; I will check my build environment.
I will play around with the clocks. I have noticed it sometimes takes a few pokes to get the LSE clock going.
Thanks for that @Gordon. This method worked well for me. The Ipad I had borrowed to update the Bangle via Nrf Toolbox kept disconnecting when I hit 'upload'.