-
JumJum,
Here you can find a tutorial using an infrared remote control with espruino.
And here is an interesting document from Vishay about the basics of infrared communication. -
Hello Gordon,
Only problem is it has a standard non-rechargeable lithium cell and the solar panel isn't actually connected!
:-)
I've got some solar cells from this german ebay store. With this one I have powered an Atmega and a LCD. But it works only outside. A Lamp or sun shining through a window doesn't provide enough power. The 5V / 100mA of the cell is only reached with direct solar irradiation.
I think the modules are from china and should be available in the UK, too.
Btw: My espruino has arrived today (January 29) in Germany
-
-
Hello,
I forgot to mention the source of wisdom :-)- Page 77, Table 12. Current characteristics
- Page, 83, Table 20. Typical and maximum current consumption in Run mode, code with data processing running from Flash memory (ART accelerator enabled) or RAM
- Page 84, Table 21. Typical and maximum current consumption in Run mode, code with data processing running from Flash memory (ART accelerator disabled)
- Page 77, Table 12. Current characteristics
-
Hello Gordon,
I have some questions about the sink/source capabilities of the STM32 chips.
The datasheet of the stm32f4xx specifies a sink/source current of 25 mA per pin. The maximum current consumption of the chip is rated with 150 mA. The stm32 itself consumpts from 87 to 109 mA (external clock, all peripherals enabled, f = 168 MHZ, T ambient = 25 to 85 C).
If I understand correctly I could connect for example two LEDs (I led = 20 mA) directly to the STM32 because 150 mA (I max) - 109 (I stm) = 41 mA.
Am I right? -
Hi Gordon,
ok, tomorrow I will try the nightly.
Today I've collected all the datasheets and manuals for the STM32F4 that are needed to understand the structure of the peripheral bus, clock sources, prescalers and timers. The information is spread about several documents.
The clock system seems to be very powerful - and dangerous :-) -
Hello Gordon,
I don't have time to fix this now I'm afraid, but the problem code will be around here: github.com/espruino/Espruino/blob/master/targets/stm32/jshardware.c#L1400
OK. It's time to dive deeper into the code :-)
When I have time this week I will try to find out whats going wrong here.
If I get stucked I will file a bug :-)Thanks.
-
Hello,
I have some problems with the following Code from this example on the STM32 F4 Discovery board:function setServo(pin,pos) { if (pos<0) pos=0; if (pos>1) pos=1; analogWrite(pin, (1+pos) / 50.0, {freq:20}); } setServo(<PIN>, 0.5);
On some pins (I've tested C9, A8, B13, E13, E14) I get half the frequency I have selected (measured 10 hz with DSO). On these pins (C7, C6, C8, B14) I get the expected results.
Wrong initialized timer? -
-
Hello,
in the US take a look at Adafruit.
In the UK I've found Hobbytronics and in Germany (where I'm located in) the usual suspects areWorldwide: Search for DS18B20 at ebay or for "DS18B20 Arduino" on google and you get a list of sources of supply for your country (with a lot of pictures and instructions to wire the sensor).
Maybe somebody can extend this list of mail order companies.
Greetings
OliverEdit: 22.10.2013 14:47h: Argh! Forgot to write "on google" in the sentence above.
-
Hello,
do you have installed the ST-Link USB-Driver? If your board is connected to the USB a virtual com port is created. It appears in the windows device manager under "Ports (COM & LPT)" as "STMicroelectronics Virtual COM Port (COMXX)" where XX is the sequence number.You can find find the drivers here.
-
-
Hello,
just found this in the documentation (ADC.md):"This returns a value between 0 and 1 (internally ADCs in Espruino are usually 12 bits, but these are re-scaled)."
What means "re-scaled"? Does Espruino use less than 12 bits?
-
Yes, I know, there is an issue "Analog read of built-in Voltage Reference" about this, but can I do this "by hand" with javascript at the moment?
Edit: Forgot to mention: STM32 VL Discovery or STM32 F4 Discovery -
Use this: eval()
Little example:
myProg = 'print("Hello world");';
eval(myProg); -
-
Here's a tip to avoid a pitfall with the VL discovery board from STM. I'm sure I've read something similar relating to espruino, but I can't find the text anymore.
If your ST-Link Utility can't connect to the board and you got an "Internal command error" use the "Connect under reset" feature of the utility. Just press and hold the reset button of the board and choose the Menu item "Target" -> "Connect" (or click on the connect icon). Release the reset button. And now ST-Link should establish a connection.
-
Note: There is now improved documentation at https://github.com/espruino/Espruino#building-under-windowsmacos-with-a-vm
Hello all,
I've been playing around the last three days with the espruino source code and I want to share my experience with the build system.
First I wanted to make it work under windows (yes, I'm a masochist :-) ) and after I burned the midnight oil I concluded: Forgot it! I have an MSYS environment and the included shell doesnt' work properly. I'm afraid that for windows there will be the need for a different build system like ant (java based) or nant (same as ant, .net version).
Next try: Linux in a virtual machine (virtual box). I installed the compiler (just untared the archive), installed a additional library for python, changed some little things in the makefile, typed "make" - and voila!
Here's a step by step guide.Preparing the build environment
I guess vour linux system or linux vm is up and running.
Check if python 2.6 / 2.7 is installed. On the shell type python -V (be careful! Big 'V'!). You need python 2.6 or 2.7. python3 doesn't work!
Check if importlib ist installed. On the shell type python -c 'import importlib' . If the lib isn't there you got an error like this "ImportError: No module named importlib".
Optional: Install importlib. You need easy_install from the package python-setuptools. I'm assuming that it's already installed. On the bash type easy_install importlib . That's all.
Check if make ist installed. Type make -v (little "v")
Download and install a compiler. I'm using this:
http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/
On the linked website got to the section ARM Processors -> Download the EABI Release.
You need to register and after that you'll get an email with a link to the download page. (I've chosen the linux tar.bz). You're best off using version 2013.05-23-arm-none-eabi, as other versions produce larger binaries which may be too big to go in Espruino's available flash memory.
Install it in your home-dir or elsewhere.
Compiling the code
Download the source code. You can find the source of the js interpreter here: https://github.com/espruino/Espruino
Download an ZIP-archive with the code https://github.com/espruino/Espruino/archive/master.zip (last button on the right side) and unzip it in your home dir or elsewhere (unzip master.zip). The root dir of the unzipped archive is "Espruino-master".
There seems to be an error in the Makefile. It always stops at the same position saying it can't find the directory 'gen'. I've created it by hand (mkdir gen) and it works.Edit Makefile. Open Makefile in an editor, search for the string "CCPREFIX" (it's in the section "ifdef ARM"), change it to /path-to-compiler/arm-2013.05/bin/arm-none-eabi-
Check the head of the Makefile for environment variables and options (boards, creating of debug version and final releases etc)
I'm using a STM32F4DISCOVERY. For that board just type on the shell STM32F4DISCOVERY=1 RELEASE=1 make . You can also "hard code" these variables on top of the makefile or just uncomment the examples in the header.
After some time (30 seconds I guess, virtual box VM with opensuse 11.2, host system Windows Vista with core i7) you get 5 files espruino_stm32vldiscovery with the endings .bin .srec .elf .lst and .hex. Take the hex-file and upload it with ST-Link to your board. Reconnect the board to the pc and it will respond in your terminal window as "Espruino V1.40 KickStarter Version".
That's all. Have fun!
-
Hardware sources:
I dont' know, what you're looking for, but the schematics and the layout of the pcb are there:
https://github.com/espruino/EspruinoBoard
@DrAzzy: The nrf draws less than 15mA (0 dBm TX power, 2 Mbps air data rate).
@conor: Thanks for sharing your code. I succesfully got two espruino boards talking together. Now I try it with arduino and espruino.