Click on this, and you bring up a list of Python example code that can take you from first steps to some quite involved hardware interaction using the Zerynth libraries. First, is the rather attractive I/O pin map - always useful when working out what pin names we need for our program:īut more importantly, If you look down the icons on the left-hand side of the IDE window you will see a light-bulb shaped icon, which is the examples button. If you are new to embedded Python programming, then you are going to love this next part, because Zerynth gives you a tremendous headstart. That’s it! We are now ready to program our board in Python. Make sure the ‘Standard VM’ radial button is selected and hit :Īfter a bit of whirring (depending on the speed of your host PC) we should be told that our device has virtualised: This will bring up an action box where you need to click the button: Now we are going to hit that button again to create a virtual machine on the target to run our code. If your board is successfully registered, you should see something like this: Which will show us that it is registering the device: Next, we want to register the device using the button on the DMT: If you now connect up your ST Nucleo to a USB port on your computer (or if you are already connected) Zerynth will recognise the ST Nucleo and you can select it in the ‘target’ box on the Device Management Toolbar: Once installed and running you will be presented with an interface not too dissimilar to this: The installation process is pretty simple, no matter what OS you are using, as you can download a Windows executable installer, a MacOS Disk image (.dmg) file or a ‘./zerynth’ script (inside the “tar.xz” archive) for Linux. Although there is a ‘Pro’ version available, the free version gives us everything we need to build pretty sophisticated applications across a range of supported boards from Arduino, Hexiware, NodeMCU, Particle, RedBear, ST Micro, Sparkfun and a number of other manufacturers. We are going to download and install Zerynth Studio as our IDE for programming the ST Nucleo board in Python. When done, you should get an “Update Successful” message. Run that executable and in the interface, click the button:Ĭlick on the now active button. Once you have downloaded the zip file and unpacked it, Windows users will find an executable file: The upgrade and instructions for installing it can be found here. We also need to upgrade our onboard firmware before we can use our Python IDE. If you are using MAC OSX or Linux, you are good to go already, as the device will be recognised automatically. This will give us access to the ST Nucleo programming port and create a virtual COM port on our host computer. If you are using Windows, your next step is to download and install the ST-Link driver. The first thing to do is make sure our power jumper is in the right place on the Nucleo board: On JP5, the jumper should connect pin 1 and pin 2: There are a couple of things we need to do before we get to use our ST Nucleo board in earnest. One nice thing about using the Nucleo is that the only other bit of hardware we need to get started is a USB A to USB mini cable which we will be using both for power and for programming the board. MCU: STM32F401RET6 ARM®Cortex®-M4 32-bit, 84MHzĭigital I/O: 50 pins at 3.3V (in the ubiquitous Arduino format) This is a capable board for embedded applications and provides us with: STM32F401 Nucleoįor our dev kit, we are using the ST Micro Nucleo F401RE board. Unless you have a slow internet connection, of course then it might take you a little longer. ![]() So in this article, I want to show how you can get to the point where you are running a ‘Hello World’ application, written in Python and running on a mainstream dev kit, from scratch, in under half an hour. That said, I also like quick and dirty ways to get a proof-of-concept up and running and I also appreciate that while my back was turned, Python took the crown as the most used programming language and is being directed toward more and more serious applications, such as machine learning with the likes of the Intel Movidius Neural Compute Stick. I have to admit that I am pretty ‘oldskool’ when it comes to programming my toys microcontroller based systems: I like the C programming language and for serious embedded programming, I am still waiting to be convinced that there is anything better.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |