JavaScript For The ESP8266

The ESP8266 is a popular WiFi chip that provides a relatively transparent connection between the TX and RX pins of a microcontroller and a WiFi network. It was released a little more than a year ago, and since then developers and hardware hackers have turned the ESP into much more than a serial to WiFi bridge. It’s a microcontroller platform unto itself, with a real development environment and support for the scripting language Lua.

Lua is okay, but a real win would be a JavaScript interpreter for this tiny WiFi platform. It’s taken months of work, but finally there’s an open source version of JavaScript available for the ESP8266.

This build is based on the Espruino firmware, a JavaScript interpreter for microcontrollers. This interpreter runs on dozens of different microcontrollers, but being the latest, greatest, and most popular new microcontroller platform means a new solution for the ESP is very, very exciting.

Right now the JS interpreter for the ESP is in testing, with expectations high that everything will be brought over into the main branch of the Espruino firmware. There are samples of JavaScript running on the ESP available, and binaries that can be flashed onto an ESP are available here.

Thanks [Richard] for sending this one in. He’s set up an Espruino board on the ESP8266 community forum, that should eventually be filled with new examples of JavaScript running on an ESP.

Hackaday Dictionary: The ESP8266

In August of 2014, something new started showing up in the markets of Shenzhen, the hi-tech area of China where the majority of the world’s electronics components are made. This is the ESP8266, a WiFi SoC (System on a Chip) that can connect to 802.11b/g/n networks on the 2.4GHz band. It can be addressed with SPI or a serial connection, and has an AT command set that makes it behave rather like an old-style modem. Basically, it has everything you would need to connect a device to a WiFi network, with the ESP8266 chip itself handling the complicated business of finding, joining and transmitting/receiving over a WiFi network.

That’s nothing particularly new in itself: WiFi connection devices like the TI CC3000 have been around for longer, and do much the same thing. The difference was the price. While the TI solution costs about $10 if you buy several thousand of them, the ESP8266 costs less than $7 for an individual board that can plug straight into an Arduino or similar. Buy the chip in bulk, and you can get it for less than $2.

The ESP8266 is more than just a WiFi dongle, though: it is a fully fledged computer in itself, with a megabyte of flash memory and a 32-bit processor that uses a RISC architecture. This can run applications, turning the ESP8266 into a standalone module that can collect and send data over the Internet. And it can do this while drawing a reasonably low amount of power: while receiving data, it typically uses just 60mA, and sending data over an 802.11n connection uses just 145mA. That means you can drive it from a small battery or other small power source, and it will keep running for a long time.

It wasn’t an easy ship to write applications for in the early days, though: it was poorly documented and required a dedicated toolchain to work with. This made it more of a challenge than many hackers were comfortable with.  That changed earlier this year, though, when the Arduino IDE (Integrated Development Environment) was ported to the chip. This meant that you could use the much easier to write Arduino functions and libraries to write code for the chip, bringing it within reach of even the most casual hacker.

Continue reading “Hackaday Dictionary: The ESP8266”

Nixie Tube Clock Isn’t Just A Clock

With everything that’s been happening in the news lately, [Jarek] decided it was finally time to finish up his latest project. The Internet of Things has been exploding with projects lately, and this clock that also alerts him of the weather is the latest addition. Plus it has the added bonus of using everybody’s favorite display: nixie tubes!

Of course, using high voltage for the nixies can be terror-inducing, but [Jarek] found a power supply on eBay that was able to power the tubes for not too much money. The controller is an HV5622 which can control up to 32 nixies while only using up three pins on a microcontroller which is pretty handy if you have a limited number of output pins.

The clock also has another device hidden behind all of the wires for the tubes: an ESP8266 to give it network connectivity. The clock connects to the Internet and searches for the nine-hour weather forecast. There are a few nixie lights behind the display which illuminate cutouts in the case to indicate a few different weather statuses. It’s a very polished project, and since it’s enclosed in a nice case it’s not likely to be mistaken for any movie props. Of course, other nixie projects don’t have the same comforting look.

Continue reading “Nixie Tube Clock Isn’t Just A Clock”

Debug An IKEA Lamp Hack, Win A Lamp Controller

[Limpkin], aka Hackaday alum [Mathieu Stephan], is at it again, converting an IKEA lamp into a visual wake-up light. He wants to build an alarm that can be remotely triggered, He’s basing this project around a combination of an ESP8266 that handles the communication and timing, and a pile of 10-watt RGB LEDs. However, he is having a problem: every time he initializes the PWM (pulse width modulation) signalling that will control the level of the LEDs, his ESP8266 dev board reboots. So, he’s offering an interesting bounty for the person who finds the issue: figure it out and he will send you the lamp. Well, the PCB and components, anyway: you’ll have to add your own IKEA lamp. It’s an interesting approach to debugging a hardware problem, so feel free to take a look. The full hardware and software details are on his GitHub repository.

LED Ring Around The ESP8266

The world needs more blinky lights, and [Bertus Kruger] has created a neat way to make lights blink wirelessly. He has a footprint in the middle of the board for soldering the castellated ESP8266 module, and an LED ring around it to create the WiFi Pixel. It’s an LED ring that can be controlled over a WiFi connection. His design is based on a combination of the ubiquitous ESP8266 WiFi chip and a NeoPixel ring from AdaFruit, so there are already great examples of how to code and control the hardware. The project is still in progress, but he has released all of the details, including the Gerber files for the board and the Arduino code that the ESP8266 is running.

It’s a great start: add in battery support and you could have an awesome way to have portable LED blinky light rings. For those who want to try it out without building your own circuit boards, [Bertus] says that it could be built with an ESP8266 dev board and an Adafruit NeoPixel ring. Currently, he is running the device from USB, but there is no reason why it couldn’t be powered from a battery for some portable USB blinkiness.

Continue reading “LED Ring Around The ESP8266”

Homebrew Mini-Chumby Blends 3D Printing, ESP8266 And A Touchscreen

We were all despondent when our Chumby’s went dead. And plans to hack at least one of them died when the device quit powering on. [Spiros Papadimitriou] must have missed his too because he’s made a good start at making his own wireless, touchscreen, smart clock.

In all honesty, it isn’t much of a Chumby replacement yet. It has a clock and can control some devices. There’s some hooks to add a weather display that isn’t finished yet. Still, it is a working first step. Of course, anyone can take a Raspberry Pi (or similar), a Wifi dongle, and a touchscreen and do the same thing, right? Maybe, but it is a lot harder to make one you (or your significant other) wants on your nightstand. [Spiros] took a lot of time to design a beautiful 3D printed case.

Continue reading “Homebrew Mini-Chumby Blends 3D Printing, ESP8266 And A Touchscreen”

The IPad Controlled Camera Slider

[Daniel] and [Tobias] dabble in videography and while they would love a camera slider controlled by their favorite iDevice, commercial motorized camera sliders are expensive, and there’s no great open source alternative out there. They decided to build one for themselves that can be controlled either from a PS3 controller or from its own iPad app with the help of an ESP8266 WiFi module.

app_live_controlThe camera slider is a two-axis ordeal, with one axis sliding the camera along two solid rails, and the other panning the camera. The circuit board was milled by the guys and includes an ATMega328 controlling two Pololu stepper drivers. An ESP8266 is thrown into the mix, and is easily implemented on the device; it’s just an MAX232 chip listening to the Tx and Rx lines of the WiFi module and translating that to something the ATMega can understand.

By far the most impressive part of this project is the iPad app. This app can be controlled ‘live’ and the movements can be recorded for later playback. Alternatively, the app has a simple scripting function that performs various actions such as movement and rotation over time. The second mode is great for time lapse shots. Because this camera slider uses websockets for the connection, the guys should also be able to write a web client for the slider, just in case they wanted the ultimate webcam.

You can check out [Daniel] and [Tobias]’ demo reel for their camera slider below.

Continue reading “The IPad Controlled Camera Slider”