Numpy Comes To Micro Python

[Zoltán] sends in his very interesting implementation of a NumPy-like library for micropython called ulab.

He had a project in MicroPython that needed a very fast FFT on a micro controller, and was looking at all of the options when it occurred to him that a more structured approach like the one we all know and love in CPython would be possible on a micro controller too. He thus ended up with a python library that could do the FFT 50 times faster than the the pure Python implementation while providing all the readability and ease of use benefits that NumPy and Python together provide.

As cool as this is, what’s even cooler is that [Zoltan] wrote excellent documentation on the use of the library. Not only can this documentation be used for his library, but it provides many excellent examples of how to use MicroPython itself.

We really recommend that fans of Python and NumPy give this one a look over!

A Retro Gaming Console For The New Generation

Ostensibly the ESPboy is an open-source hackable game engine built as an IoT platform for STEM education and play, but there’s no way [RomanS] could have been inspired by anything other than retro gaming consoles from the near past. For anyone who grew up playing with Tamagotchi pets or Palm Pilots, this project is going to be a major throwback.

The Saint Petersburg-based microcontroller hobbyist utilizes a ESP8266 microcontroller to build a series of modules for different game play modes, including a TFT display, GSM phone, MP3 player, GPS navigator, FM radio, and keyboard module. He has plans to build even more modules, including a LoRa messenger and thermal camera, to really expand the system’s capabilities.

Since the board has built-in WiFi, firmware can be uploaded to the device without a wired connection and compiler. The nature of the project makes the board compatible with the Arduino IDE and Micropython, which makes hacking the software even easier.

A TP4056 battery charging module charges the LiPo, although depending on the battery capacity, the charging current (set by the R3 resistor on the controller) does require some change. A MCP4725 I2C DAC is used for smooth driving the LCD’s backlight. In order to extend the battery life, the battery controller uses sleep mode to periodically wake up to measure and send data, which allows it to extend its battery life without external power. There’s also transistor driven buzzers that provide a little extra feedback to the user when playing games, complete with a variable resistor to adjust the sound volume.

A number of free pins run along the periphery for connecting to other modules, including pins for GPIO extension, sensor adapters, connectors to addressable LEDs, and an extension slot for actuators. For anyone interested in making their own version of the ESPboy, the PCB schematics are accessible online.

Projects like the Arduboy have shown that a small microcontroller-based game system can be equal parts fun and educational, so we’ve been excited to see more of these types of projects popping up during the course of the 2019 Hackaday Prize.

Continue reading “A Retro Gaming Console For The New Generation”

Tiny ESP32 Fits Inside USB-A Connector

The ESP32 was introduced a few years ago as an inexpensive way to outfit various microcontrollers with WiFi or Bluetooth. Since then it has been experimented with and developed on, thanks to its similarities to the ESP8266 and the ability to easily program it. Watching the development of this small chip has truly been fascinating as it continues to grow. Or, in this case, shrink.

The latest development in the ESP32 world comes from [femtoduino] who, as the name suggests, makes very small things. This one is a complete ESP32 which fits inside a USB-A connector. The brains of the projects is the ESP32-D2WD which is a dual core chip with 2 Mb of memory, making it more than capable. In fact, a big part of this project was [femtoduino]’s modifications to MicroPython in order to allow it to run on this chipset. For that alone, it’s cool.

This project is impressive for both reasons, both the size and the addition to the MicroPython libraries. If you need something really really tiny, for whatever reason, you might want to look into picking up one of these. Be careful though, and be sure to get the latest version of the SDK.

Micropython And C Play Together Better

Python is a versatile, powerful language but sometimes it’s not the best choice, especially if you’re doing work in embedded systems with limited memory. Sometimes you can get away with MicroPython for these cases, but the best language is likely C or assembly. If you’re really stubborn, like [amirgon], and really want C and Python to play well together, you can make use of his new tool which can bring any C library to MicroPython.

As an example of how this tool is used, a “Pure MicroPython” display driver for ILI9341 on the ESP32, which means that everything was implemented in MicroPython. [amirgon] wanted to see how the Python driver would compare to one that’s already been written in C, and use it to showcase MicroPython binding. This tool also automatically converts structs, unions, enums and arrays to Python objects, and provides a means to work with pointers which is something that Python doesn’t handle in the same way that C requires.

[amirgon] hopes that this tool will encourage the adoption of Micropython by removing the obstacle of missing APIs and libraries in MicroPython. Since most libraries for systems like these are written in C, a way to implement them in Python is certainly powerful. We featured one use case for this a while back, but this is a much more generic fix for this coding obstacle.

Image via [Frank Stajano]

 

Hands-On: CCCamp2019 Badge Is A Sensor Playground Not To Be Mistaken For A Watch

Last weekend 5,000 people congregated in a field north of Berlin to camp in a meticulously-organized, hot and dusty wonderland. The optional, yet official, badge for the 2019 Chaos Communication Camp was a bit tardy to proliferate through the masses as the badge team continued assembly while the camp raged around them. But as each badge came to life, the blinkies that blossomed each dusk became even more joyful as thousands strapped on their card10s.

Yet you shouldn’t be fooled, that’s no watch… in fact the timekeeping is a tacked-on afterthought. Sure you wear it on your wrist, but two electrocardiogram (ECG) sensors for monitoring heart health are your first hint at the snoring dragon packed inside this mild-mannered form-factor. The chips in question are the MAX30001 and the MAX86150 (whose primary role is as a pulse sensor but also does ECG). We have high-res ADCs just waiting to be misused and the developers ran with that, reserving some of the extra pins on the USB-C connector for external devices.

There was a 10€ kit on offer that let you solder up some electrode pads (those white circles with gel and a snap for a solid interface with your body’s electrical signals) to a sacrificial USB-C cable. Remember, all an ECG is doing is measuring electrical impulses, and you can choose how to react to them. During the workshop, one of the badge devs placed the pads on his temples and used the card10 badge to sense left/right eye movement. Wicked! But there are a lot more sensors waiting for you on these two little PCBs.

Continue reading “Hands-On: CCCamp2019 Badge Is A Sensor Playground Not To Be Mistaken For A Watch”

Hackaday Prize Mentor Session: Beau Ambur

Beau Ambur can often be found hosting hardware events and offering help all around the Bay Area. Now he’s turned it into a career and travels the west coast helping hackers and creators effectively leverage Kickstarter’s platform. Beau’s mentor session covers everything from, “is this project a good fit for venture capital?” to, “is open source a good fit for my project?”.

For this year’s Hackaday Prize we’ve found experts in a wide range of fields so you can take your entries to the next level regardless of the stage the project is in. The sessions are on a first come basis so sign up now for a chance to get some valuable feedback on your entry.

Your Robot Language Coach

The first project is a Personal English Trainer by the lonely programmer. As a student he noticed a need for a more interactive and portable language learning aid. Solutions do exist on the market but they are along the lines of a pocket dictionary, instructional phone app, or a full on translator. These break the flow of thought and conversation. The lonely programmer envisioned something that you can conversationally ask for help as you’re using a new language.

As many have discovered, the best way to see if there’s a need for something is to build a minimum viable product (MVP). The snips.ai platform offered the perfect foundation to quickly test out the idea. It’s working on a few words and he wants to get it ready for more people to play with the idea. The majority of the lonely programmer’s questions centered around making the project interesting for other hackers so that it could one day turn into a product.

Bolt-On Bike Assist

Rob and Shushanik are developing a project called BikeOn. It bolts to any bicycle and converts it to an electric assist bike without tools or replacing any components. BikeOn has already won some accolades such as Editors Choice at the last 2019 Makerfaire Bay Area. Rob had a few questions on how to transition a project from the proof of concept stage to the product stage. The discussion went over using open source as a tool for product promotion as well as getting funding for taking a hardware product to market.

He also wanted to know if there was anything the team could do to have a better shot at winning the prize. There were a few good tips such as directly focusing on the five categories the judges would be looking at: Concept, Design, Production, Benchmark, and Communication. It is also important to cover the development journey. Why did you make the choices you made when designing the project?

No-Spill Trash Can Concept

Rounding out this mentor session, Jeannie and her team of highschool students demonstrate SEAL. In the area around the Granada Hills Charter High School there are winds mighty enough to blow over full trashcans. This trash travels to the ocean and disrupts local ecosystems. The team is working on a device which can detect a tipping trashcan and keep the lid from opening.

Prototyping started with Arduinos, but they’ve already escalated to designing their own PCBs. Their hope is to produce a run of fifty devices and try them out with a local commercial partner. Beau recommended they look into the Micropython ecosystem. Not only would the students get the advantage of using the STM32 chips in their board layouts (reducing the number of support components they would need), micropython would make it easier for students to jump in and help rather than having to learn the nuances of C first.

The Hackaday Prize mentoring sessions continue through the summer so don’t forget to sign up and check out the list of mentors who are here to share their knowledge and experience.

Continue reading “Hackaday Prize Mentor Session: Beau Ambur”

Building An ESP8266 Game System With MicroPython

After a seemingly endless stream of projects that see the ESP8266 open doors or report the current temperature, it can be easy to forget just how powerful the little WiFi-enabled microcontroller really is. In fact, you could argue that most hackers aren’t even scratching the surface of what the hardware is actually capable of. But that’s not the case for [Brian Wagner] and his students from the Kentucky Country Day School.

Their project, the GamerGorl, is a completely custom handheld game system running on a Wemos D1 Mini development board. The team’s PCB, which was developed over several iterations, is essentially a breakout board which allows them to easily connect up peripheral devices. Given the low total component cost of the GamerGorl and relative simplicity of its construction, it looks like a phenomenal project for older STEM students.

Beyond the ESP8266 board, the GamerGorl features a SSD1106 1.3″ OLED display, a buzzer for sound effects, two tactile buttons, and an analog joystick originally intended for an Xbox controller. Around the backside there’s a WS2812B RGB LED strip that’s at least partially for decoration, but it’s also actively used in some of the games such as the team’s take on Simon.

Even if you aren’t in the market for a portable game system, the GameGorl does provide an interesting case study for MicoPython applications on the Wemos D1 Mini. Browsing through the team’s source code as well as the helpful hints that [Brian] gives about getting the software environment up and running could be useful if you’re looking to expand your ESP8266 programming repertoire. We’d also love to see this device running the “ESP Little Game Engine” we covered recently.

Continue reading “Building An ESP8266 Game System With MicroPython”