-
-
Yes - you can use peek and poke commands to access the ADC directly - just follow the relevant datasheet.
Although if you implemented the functionality in Espruino itself it'd be great (it could be as easy as modifying build_pininfo to include an additional pin that referenced the correct ADC channel).
-
I think it's because it's trying to include an stm32f1 header file. You'll have to edit
libs/fat_sd/*
and#ifdef STM32F4
all the includes. You'll also need to modify the header file to have the correct pin definitions. If you want to change that and modify build_patform_config.h to automatically set the pin definitions that'd be awesome though.Personally I wouldn't use SDIO as it's just ore complexity - just stick with normal SPI and follow the circuit from https://github.com/espruino/EspruinoBoard
-
I think this was a regression on 1v39 - it does work on the latest version in Git. You just need to hang on until I release a new one - or you can use an unofficial nightly build: https://espruino-nightly.noda.se/
-
Hi, no - it just says that when our backers get the board, it'll have CC3000 support - same for NPM, tutorials etc.
Surprisingly it takes time to implement these things - they weren't done already or they wouldn't have been stretch goals.
I probably should have done like everyone else and released source 'when it was done'.
-
If you mean using Espruino directly from C code, you want something like:
JsVar *v = jsvNewFromString("......"); jsvUnLock(jspEvaluateVar(jsiGetParser(), lineToExecute, 0)); jsvUnLock(v);
Note that EvaluateVar returns a result as well.
Espruino can't execute directly from char* strings (only from JsVar-based strings).
-
-
We're still adding CC3000 support - so some code is in there but it's not working yet.
Espruino does have modules - you put them on the SD card in the node_modules dir and they work like this:
https://github.com/espruino/EspruinoDocs/blob/master/devices/DS18B20.js
If you do make some modules, please issue me with a pull request for EspruinoDocs - I'm trying to build up the library. The API may change slightly soon so that we can be relatively compatible with Firmata + Tessel and use their drivers (hence the use of the 'hardware' module).
There's also going to be something added to the Web UI that will allow you to do something like 'npm install' even if your board isn't itself connected to the net.
-
Hi Frida,
So I think you actually mean:
digitalPulse(LED1, 1, 1200)
This is expected... So what happens is that digitalPulse sets the pin to 1, then starts a timer in the background, which sets the pin low after 1200ms = 1.2 seconds.
If you then call digitalPulse again, it waits for the first timer to finish before it starts the next pulse. Rather than hang the device, it only waits around a second for the pulse before giving up and raising an error.
Perhaps it should produce a better error message, but I think the behaviour is right. If you typed
digitalPulse(LED1, 1, 100000000000)
you wouldn't want the device to just stop working while it waited.digitalPulse is for short 'pulses' that need to be very accurate. For longer pulses, use setTimeout instead.
-
I learnt it for websites too - I wanted to do animations with it...
There is actually Python for Microcontrollers called PyMite (I'm not sure it has the interactive console though).
I just really don't 'get' Python though. I love the huge amount of libraries it has (and I do use it because of that), but I don't understand why it has a completely different syntax to every other modern language.
-
Thanks! Using a VM is definitely a good way to go - I wonder if someone could wrap this up in a script that could be executed once a VM was set up?
There's also USB stick Ubuntu as well - could be worth a try:
http://www.ubuntu.com/download/desktop/try-ubuntu-before-you-install -
Also, I'll be auto-generating the docs from this repo soon:
https://github.com/espruino/EspruinoDocs
So if you have anything (drivers, help, etc) please just add it and issue a pull request. Hopefully once I have the auto-generation properly done, everything will be a bit better organised in there.
-
Hi, Yes, that should be possible!
Once you have created a module, you just stick it in the node_modules folder of the SD card. There's an example of what it should look like here:
https://github.com/espruino/EspruinoDocs/blob/master/devices/DS18B20.js
HOWEVER This is likely to change - specifically in order to make modules compatible with Tessel, Firmata etc, the I2C commands may change slightly in the next few weeks.
-
-
Hi everyone - we're expecting a bit more traffic to our forums after the KickStarter, and Google Groups isn't really up to it so we're using our friends at http://microcosm.app/ ...
Hi. This was covered on GitHub - basically the API has changed to be more Java-like. The documents that come along with that build do describe the correct API - but the ones on the website are for 1v39 which has the old API.
As explained on GitHub, everything is in flux before the Espruino board release.