Posts

Showing posts from June, 2019

Sambot - MeArm, servos, the Babelboard and Jetson Nano

Image
Jud McCranie CC BY 3.0 via Wikimedia Commons Way back in 1974 I took Tom Westerdale's Adaptive Systems course as part of my Masters degree. Tom's thesis advisor was John Holland, and a lot of the course covered genetic algorithms. Before that it covered early machine learning applications like Samuel's Checkers Player . I've wanted to revisit those early AI applications for a while, and I recently decided to put a new spin on an old idea. I want to build a robot that plays Checkers (that's draughts to us Brits) using a real board, a robot arm and a Jetson Nano using a Raspberry Pi camera. The game play could be done using a variant of Samuel's approach, a Neural network, or a combination of the two. If AlphaGo can master Go playing against itself it shouldn't be too hard for a pair of Machine Learning programs to maser draughts! First, though, I need to build a controllable arm that can pick up and move the pieces and a computer vision system t

An excellent course for Jetson Nano owners

Image
Jetson Nano Regular readers will know than I'm a keen Jetson Nano owner. Recently I posted a series about how to started with the computer but NVIDIA have now published an excellent course,  ' Getting Started with the Jetson Nano ', which is  free for members of the NVIDIA developers' program. The course comes with a pre-built image which can run the Nano in headless mode. That's very useful - I had to buy a new monitor to get going, as none of my old monitors had native HDMI support. The image provide with the course just needs a Nano and a Laptop or Desktop computer with a USB port. The course is a great introduction to deep learning with a GPU. Once you've completed it you may want to delve deeper; there are lots of excellent Deep Learning courses available on-line, and many of them use Google's Colab for practical sessions. Google Colab gives you free access to top-of-the range NVIDIA hardware, and if you want to run your trained models l

Use websockets to build a browser-based Digital Voltmeter

Image
This is the third and final part of a series about building a browser-based six-channel Digital Voltmeter (DVM) using an Arduino and a Raspberry Pi. Part one covered the software on the Arduino and the USB connection to the Raspberry Pi. Part two showed you how to use the pyserial package to read that data into a Python program and print the results as they arrived. In this final part you'll see how to use Joe Walnes ' brilliantly simple websocketd . You'll see how you can turn the Python program into a server without writing any additional code! Finally, you'll view a web-page that displays the voltages in more or less real-time. Web sockets with websocketd HTTP makes it easy for a web browser to ask for data from a web server. That approach is known as client pull because the client (the web browser) pulls (requests) the data from the server. For the DVM application you want to use server push; in other words, you want to send changes in the voltages

Using pyserial on a Raspberry Pi to read Arduino output - WebDVM part 2

Image
This series describes how to build a simple web-based DVM (digital volt meter) that can display up to six voltages in a web browser. It's a really useful hack if you need to measure several voltages at once. In part 1 you saw how to send analog voltage data over a serial link to a Raspberry Pi. For testing purposes you displayed the data in a terminal window on the Pi. In this part you will use read that data using Python on the Pi and print the data to standard output. In the next part you'll turn your Python script into a dynamic application that displays the 6 voltages in a browser, updating the web page as the values change. The code ( available on github ) uses the pyserial package. It's a simple approach, but there are a few issues to find your way around. You'll see the problems and solutions below. Pyserial pyserial is a Python package that allows Python programs to read and write data using serial ports. You can install it via pip. pip3 ins

Build a Web-based DVM using Arduino and Pi zero W

Image
This three-part series show you how to build build a Web-based 6-channel DVM (digital voltmeter)  using an Arduino and Raspberry Pi zero. If you’re experienced and impatient you will find software and basic installation instructions on GitHub. If you’re less experienced, don’t worry. All you need to know is: how to compile and download an Arduino sketch, how to connect your Raspberry Pi to your network, and how to open a terminal session on the Pi. The project is fun, useful, and simple. You probably have the parts already, in which case the whole project will take about an hour to program and connect. You don’t need to solder anything. The WebDVM uses some general techniques that you can apply to projects of your own In Part 1 (this post)  you will install some simple Arduino code, connect the Arduino to a Pi, and check that the two are communicating. In Part 2 you’ll use a short Python program on the Pi to read the Arduino’s output. In Part 3 you'll use a simp