-
Thanks for answering - sorry for the lack of response to your e-mail @user66517 - I've been a bit busy with the KickStarter.
Yes, Pinned is definitely the way to go if you haven't soldered before... And just follow the Quick Start guide, then some of the tutorials - you don't really need much electronics knowledge to get started.
Personally I'm not so sure of places to go to find out about electronics, but:
- Adafruit do loads of tutorials, including some good videos: https://learn.adafruit.com/
- Make: do quite a good book: https://www.amazon.co.uk/Make-Electronics-Discovery-Charles-Platt/dp/0596153740
- Adafruit do loads of tutorials, including some good videos: https://learn.adafruit.com/
-
-
@JumJum thanks! That's really interesting - hadn't seen it before, I'll have to see how it works
-
Yes, the
Clock
class just works off of whatever the time currently is, and stores an offset as a variable inside it.Instead, you can use the
setTime
function: http://www.espruino.com/Reference#l__global_setTimeJust make the first argument the number of seconds since 1970 and you're good to go!
-
-
:) you're probably a bit of an outlier, in that you've already got a bunch of self-made RF-based home automation stuff you're using. IMO the use case you'd be most interested in is:
- Set a Pi/server (which I guess you already have :) with BLE, running an MQTT server
- Use these as wireless sensors, IR transmitters, or controllers for other stuff - but small, properly battery powered, and cased so they'd blend in.
... Then there's the possibility of IPv6, so you'll be able to treat these things almost like they're on WiFi, but just with a decent battery life.
Also, modules with nRF51/52 are actually pretty cheap. By backing Puck.js you make sure that the software for them gets nice and mature, and then you can use it to make your own devices that use the bare modules - which IMO will work out cheaper than using separate radio + MCU :)
- Set a Pi/server (which I guess you already have :) with BLE, running an MQTT server
-
-
-
I use the maximum baud rate on the SIM900, can this be a cause?
What is the baud rate? It definitely won't help... The Pico can buffer around 500 bytes, so it won't take long to fill it at higher rates. I'd definitely try and lower the rate significantly - it should stop the FIFO_FULL messages anyway.
So I came to the conclusion the SIM900 mixed it up(?)
I think the SIM900 is probably fine - it's just that Espruino's buffers are getting full so it's losing the odd character.
-
I'm still confused about
Uncaught Error: Field or method "total_documents" does not already exist, and can't create it on undefined
But the
"FIFO_FULL"
flag really is your problem - some part of your program is taking as long time to execute, and during that time the FIFO gets full and characters get dropped.Which board are you using this on? And you're connecting over USB?
-
Strange - I haven't seen that before. After
RECEIVE,0,940
there should be 940 characters - but I don't see that at all.Can you check
E.getErrorFlags()
when this happens? It's possible it is running slowly enough that characters can't be processed and are getting lost. In fact if you have other code that takes a long time to execute then this could be the problem with the original code as well.Can you try using
gsm.at.debug()
and dumping the output from that? I'm not quite sure how you're generating what I see in the dump above? -
-
-
Unfortunately, one of the reasons
Uint8Array
is compact is because it doesn't store class info inside the structure (that might not be 100% JS compliant I'm afraid, but it does save memory). You could just add your functions toUint8Array.prototype
instead?However, it looks like you're storing 4 x 8 bit numbers for the colour? In which case you could use a simple number instead - which is even more compact - and just shift the colours in/out as needed.
So you could just add to
Number.prototype
and your colours would be super compact, using just one variable per whole colour. It's actually pretty neat - but obviously you'd want to be careful with your naming so it didn't interfere with other things. -
That looks really helpful - thanks!
I could add links to this to https://github.com/espruino/Espruino#modification ?
-
-
-
On the master, it's just:
USB.setConsole(true); // make sure console stays off Serial1 var line = ""; Serial1.on('data', function(d) { line += d; i= line.indexOf("\n"); while (i>=0) { console.log(line.substr(0,i)); // do stuff with data line = line.substr(i+1); i = line.indexOf("\n"); } });
And on the slave, make sure
echo(0)
is set to avoid the console outputting a load of extra control characters, then just callconsole.log(..)
to return the data you want. -
-
Have you tried on another computer, just in case it's some kind of configuration issue with the COM port?
Also, when plugged in and you get that text (out of bootloader mode), try
[Ctrl-C] [Ctrl-C] echo(1) [Enter]
and see if a prompt appears. If it does, reset and save (but that shouldn't affect the bootloader) -
Yeah, we know it was going - but I didn't know when... it's good to have a date. David (who develops the forum) has known for a while, and I believe there is a plan to migrate away from it as microcosm runs some much bigger sites than Espruino as well.
I'll try and find out what the plan is and report back though.
-
Also, if you do write it up, please could you mention the Puck.js KickStarter ? it's for this sort of thing, but much faster and with more memory.
-
-
Yes - so what's on http://www.espruino.com/binaries/travis/master/ now should work.
Great! glad you got it sorted - the drivers are pretty strange like that... I'm tempted to just distribute them outside the ZIP file :)