Monthly Archives: March 2018

Enginursday: Create a Web-Controlled Robot Using the ESP32 Thing

via SparkFun: Commerce Blog

alt text

I’ve been continuing to explore how to use the ESP32 Thing. In a previous Enginursday, I built an OLED Clock that uses the ESP32 to automatically get the time from the internet. This week I wanted to build a robot that you can control from your web browser using the arrow keys on your computer. For a full tutorial on how to make your own, stay tuned for a tutorial on our page, but for a brief overview continue reading below.

alt text

The Hardware

The robot is focused around our shadow chassis, and the motors are controlled with our Serial Controlled Motor Driver (SCMD). Some of the other parts used are a 2200mAh battery, a USB-A Female Breakout (to avoid having to hack apart the USB cable to provide power to the camera), and a 5V DC/DC Converter. In addition to the ESP32 Thing, I used our Motion Shield to store the HTML file that the ESP32 serves to client when they connect.

Having the HTML file on the SD card sped up the development time because this way I could make changes to the file without having to wait for Arduino to compile the code for the ESP32. The DC/DC converter is important because I needed to regulate the 6-8.4V battery voltage down to 5V to not only extend the battery life with the increased efficiency of a switching regulator, but also because the camera and ESP32 will draw 500mA of current, which would normally cause a linear regulator to get quite toasty.

The Software

Getting started with this project left one big question in my head, “Can the ESP32 handle a video stream?”. And the answer I ended up with was: not sure, but it doesn’t matter. Something I wasn’t sure about was how the ESP32 would handle a link when a client connected to the web server. Would the ESP32 see the link to the camera’s image stream and store the image in memory? How big of an image could I display before the ESP32 ran out of memory and crashed? Or is it up to the client to go to the image stream and create the image?

To find out the answer, I found a public IP camera and embedded the video stream into my HTML page. What I discovered was that it doesn’t matter if it’s an image or a video link – all the ESP32 does is send the HTML code to the browser, and it’s up to the browser to figure out what needs to be displayed where. So when the browser saw a link, the browser went to the URL and retrieved the image or video.

For the ESP32 and HTML code, you can find it on my GitHub here. In the HTML code, I check for keyboard presses and releases (specifically the arrow keys). When a key is pressed, a text string is saved in a separate page using an XML request. When text is sent to the page, the ESP32 scans the request to see what action it should take. These could be to drive forward/backward or turn left/right.

The hard part was trying to embed the video stream into the HTML file. Each camera manufacturer has their own way to stream video. Some of the older cameras use a MJPEG from a HTTP link, but the newer cameras use what’s called a Real Time Streaming Protocol (RTSP), instead of HTTP. An RTSP link isn’t native to HTML5 and requires a Javascript library to convert the stream. To keep the file size smaller, I found that the camera can grab snapshots of the image from a HTTP link, and with significantly less code I was able to create a video stream by taking snapshots at a regular time interval to make it look like a video stream.

See the Robot in Action

When I was first planning out this post, I wanted to drive it around our office and record my screen to see how much fun it was to drive around, and look at all of the reactions of people as they stare at it driving past their department. As it traveled, it picked up few fashion accessories along its way:

alt text

But just watching me drive around isn’t really all that fun. What would be more fun, is to let YOU drive the robot around. You can access the robot from this link. Unfortunately, it only seems to work on Firefox and Safari. In order to view the IP camera stream you need to log into the camera, which can be embedded in the URL for the camera, but Chrome and Edge will block passing the credentials for security reasons. If you’re asked for a user name and password, enter guest for the user name and password for the password. The camera is capable of 30FPS, but in real world conditions, the frame rate varies from ~12-25FPS. The controls are pretty simple:

Arrow Keys:

  • Up - forward
  • Down - backward
  • Left - turn left
  • Right - turn right
  • Press and hold - continuous movement
  • Single press - single step forward/backward and slight turn left/right

Ground Rules

First, I don’t know what is going to happen. I don’t know how many users can connect before the ESP32 crashes, or how many users can access the camera at any given time. Most importantly, be patient and share. I don’t have anything fancy going on in the code to create a queue of users with a time limit on driving. If one person tells it to drive forward, and another then tells it to drive in reverse, it will execute the last command that was received. So try and let other people take turns driving it.

Second, you are confined to Engineering. We have barriers set up to keep the robot in my department, trying to drive over them will just get the robot stuck. I’m going to try and keep an eye on it, but once it gets stuck, it might be stuck for a while, so it might be best to try and steer clear of the barriers.

The page might go down occasionally. It might be that the battery is being replaced, or the ESP32 and/or camera have crashed due to the number of users. Give it a couple of minutes, and it should be back online. I’m only planning on having the robot online from 8:30am-5:00pm (MDT) on Thursday 3/22 and Friday 3/23.

And that’s it! Have fun driving around our offices. If you want to drive by my office and say hi, my office is the door with a life sized (-ish) Han Solo vinyl sticker.

comments | comment feed

HackSpace magazine 5: Inside Adafruit

via Raspberry Pi

There’s a new issue of HackSpace magazine on the shelves today, and as usual it’s full of things to make and do!

HackSpace magazine issue 5 Adafruit


We love making hardware, and we’d also love to turn this hobby into a way to make a living. So in the hope of picking up a few tips, we spoke to the woman behind Adafruit: Limor Fried, aka Ladyada.

HackSpace magazine issue 5 Adafruit

Adafruit has played a massive part in bringing the maker movement into homes and schools, so we’re chuffed to have Limor’s words of wisdom in the magazine.

Raspberry Pi 3B+

As you may have heard, there’s a new Pi in town, and that can only mean one thing for HackSpace magazine: let’s test it to its limits!

HackSpace magazine issue 5 Adafruit

The Raspberry Pi 3 Model B+ is faster, better, and stronger, but what does that mean in practical terms for your projects?


Kids are amazing! Their curious minds, untouched by mundane adulthood, come up with crazy stuff that no sensible grown-up would think to build. No sensible grown-up, that is, apart from the engineers behind Kids Invent Stuff, the brilliant YouTube channel that takes children’s inventions and makes them real.

So what is Kids Invent Stuff?!

Kids Invent Stuff is the YouTube channel where kids’ invention ideas get made into real working inventions. Learn more about Kids Invent Stuff at Have you seen Connor’s Crazy Car invention? Have you seen our Flamethrowing piano?

We spoke to Ruth Amos, entrepreneur, engineer, and one half of the Kids Invent Stuff team.


It shouldn’t just be kids who get to play with fun stuff! This month, in the name of research, we’ve brought a Stirling engine–powered buggy from Shenzhen.

HackSpace magazine issue 5 Adafruit

This ingenious mechanical engine is the closest you’ll get to owning a home-brew steam engine without running the risk of having a boiler explode in your face.


In this issue, turn a Dremel multitool into a workbench saw with some wood, perspex, and a bit of laser cutting; make a Starfleet com-badge and pretend you’re Captain Jean-Luc Picard (shaving your hair off not compulsory); add intelligence to builds the easy way with Node-RED; and get stuck into Cheerlights, one of the world’s biggest IoT project.

All this, plus your ultimate guide to blinkenlights, and the only knot you’ll ever need, in HackSpace magazine issue 5.

Subscribe, save, and get free stuff

Save up to 35% on the retail price by signing up to HackSpace magazine today. When you take out a 12-month subscription, you’ll also get a free Adafruit Circuit Playground Express!

HackSpace magazine issue 5 Adafruit

Individual copies of HackSpace magazine are available in selected stockists across the UK, including Tesco, WHSmith, and Sainsbury’s. They’ll also be making their way across the globe to USA, Canada, Australia, Brazil, Hong Kong, Singapore, and Belgium in the coming weeks, so ask your local retailer whether they’re getting a delivery.

You can also purchase your copy on the Raspberry Pi Press website, and browse our complete collection of other Raspberry Pi publications, such as The MagPi, Hello World, and Raspberry Pi Projects Books.

The post HackSpace magazine 5: Inside Adafruit appeared first on Raspberry Pi.

Testing the TPS61092 boost converter

via Dangerous Prototypes


Testing the TPS61092 boost converter from LuckyResistor:

For my current project I searched for a good boost power converter which is able to deliver continuous 400mA power for various sensors.
There are an endless number of good boost converters around, but not many can be hand soldered to a board. I would really like to see some like the TPS61092 with SOIC or similar packages. The biggest problem seems to be the heat transport, why most chips have to be mounted flat on the board.

Before using the chip in my project, I created a small test board. Using this board I can test various things. First I liked to test the performance under load. Next I tested if the chip can be hand soldered and finally I tested the final board layout I will use in my project.

More details at

Video: Getting Started with the Tic Stepper Motor Controllers

via Pololu Blog

As I showed in my last post a few weeks ago, our Tic stepper motor controllers offer six different control interfaces so you can add stepper motors to a variety of projects. Getting started with the Tics is easy. This new video tutorial steps (see what I did there?) you through getting your stepper motor running with our Tic controllers:

As I was making this video, I realized one of the coolest things about the Tic is how quickly you can work out the capabilities of your stepper motor. Even if you’re comfortable using one of our stepper motor drivers along with a microcontroller, using the Tics makes adjusting settings like current limits, step rates, speed, and acceleration as quick as a click of the button, and you can control your motor directly from the software to make sure it’s behaving how you would like. So you might want to keep an extra Tic around for that purpose, just as a stepper motor tester.

Right now you can still purchase our newest Tic at a special introductory price of just $15.53 using the coupon code T500INTRO! (Click to add the coupon code to your cart.) We also cover shipping in the US! Note that this introductory offer applies only to the units without connectors soldered in.

OSHWA Certification 2.0

via Open Source Hardware Association

After almost a year and a half of community discussion, OSHWA unveiled the Open Source Hardware Certification Program at the 2016 Open Hardware Summit.  Today, with the help of a major grant from the Sloan Foundation, we are excited to announce that we are taking major steps towards Certification 2.0.

The original certification program has some fairly straightforward goals.  It is designed to make it easy for creators to identify their hardware as compliant with the community definition of open source hardware, as well as make it easy for users to know that hardware that is advertised as “open source” meets  their expectations.  The certification process gives a creator confidence that they have done everything required to call their hardware open source.  The certification logo gives users confidence that they will be able to access, build upon, and hack any hardware that they receive.

We didn’t know what to expect when we launched the certification program and have been blown away by the results.  There are currently 170 certified hardware projects from 18 countries on 5 continents participating in the program.

While we are excited about the certification program, shortly after it launched we started thinking of ways to improve it.  The current interface built on a combination of google forms and wordpress is functional, but not necessarily elegant.  Once the process was live, we also started getting feedback from users on ways to make it better.  One major concern was that the registration process exists in a bit of a vacuum.  It asks the creator to verify that she has complied with all of the requirements but does not provide very much guidance on the best ways to comply or the various choices that can be made and still comply.

For the past year we have been working with the Technology Law and Policy Clinic at the New York University School of Law to create more robust guidance to help creators navigate the licensing, documentation, and other decisions that creators must make when they are working towards certification.  We have also been working with the team at Objectively to turn that guidance into an interactive process that draws on examples from the community.

The grant from the Sloan Foundation allows us to take that work and turn the certification into a much more robust and useful resource.  We are hoping to have the new site ready to launch by the 2018 Summit.  Until then, please let us know if you have thoughts, ideas, or concerns.  We are very excited about the next chapter of the Certification Program and hope you will be too.

A beautifully finished Arduino temperature and humidity sensor

via Arduino Blog

Jay and Jamie wanted a temperature and humidity sensor for their workshop. Instead of buying something off the shelf or hooking up an Arduino with the proper sensor and breadboard, they went the extra mile.

The duo crafted a beautiful walnut enclosure—compete with a 3D-printed logo and a clever opening for the temperature display using an LCD screen. Humidity is indicated by the color of a NeoPixel ring, which shines through the artwork via a frosted plastic as a diffuser.

It’s immaculate on the outside, while hot glue is used extensively inside to hold everything in place. An Arduino Uno powers the build, attached by a handy plastic case.

We live in Central Texas where we get massive swings in humidity and temperature in the spring, which can be disastrous for certain woodworking projects. This cool project helps alert us when the humidity is changing or starts to get high so we can take precautions like moving our wood projects into the house, or not doing any milling during the high humidity weather. It also looks awesome and has our sweet logo.

Be sure to check out their entertaining video for lots of tips and tricks to make your project look excellent!