This repository contains the source code of the FPGA for Robotics Education project (part 2).
Part 1 of the project can be found here
The common directory contains generic modules that are used in multiple projects.
The other directories each corresponds to a project and contains a top level module, a Makefile, and some other private modules.
All the projects are systhesised using webfpga, which can be installed using
pip install webfpga
After the module is installed, run the following command to synthesis and flash bitstream (assuming python is python3).
python webfpga_local.py synth ./common/*.v ./<project_folder>/*.v
python webfpga_local.py flash bitstream.bin
On Windows, the libusb
backend needs to be manually installed for the flash
command to work
pip install libusb
pip install pyusb
After libusb is installed, you should be able to find libusb-1.0.dll
at the following locations
<Python-install-path>\lib\site-packages\libusb\_platform\_windows\x64
<Python-install-path>\lib\site-packages\libusb\_platform\_windows\x86
Add the one that matches your python and system architecture to PATH and restart PowerShell. The flash
command should work now.
For example, I have Python 3.9 (64-bit) installed and my libusb module was installed without using
a virtual environment, so the libusb-1.0.dll
I want to use is located at:
C:\Users\<my-user-name>\AppData\Local\Programs\Python\Python39\lib\site-packages\libusb\_platform\_windows\x64
We are aware that the WebFPGA CLI utility is not exactly easy to set up on Windows, so we have built an unofficial GUI wrapper of the command line utility. See the WebFPGA-GUI repo for details.
Bluetooth RC command format
Bit | 7 | 6 | 5 | 4:0 |
---|---|---|---|---|
Notes | test=0; command=1 | left=0; right=1 | forward=0; backward=1 | speed / 32 |
Also available on hackster.io
Please make sure that you have completed the original project (Interfacing the TI RSLK MAX with WebFPGA for FPGA Education) before starting the activities discussed in this project.
If you have completed the labs in the original project, you are probably familiar with FPGA and basic Verilog programming by now. In this project, we will demonstrate some more advanced use cases of the WebFPGA as a control unit.
- Lab 5.5: Feedback Control (hackster.io link)
This lab can be attempted once you have completed Lab 4: Motors and Movement and Lab 5: Encoders and Precision Movement in the original project. Lab 6 is not a prerequisite because the IR sensor is not used in this lab.
- Lab 7: Maze Solver (hackster.io link)
In this lab we will implement a maze solver using everything you have learned so far. It is recommended that you complete Lab 6: IR Sensors and Line Following before starting this lab.
- Lab 8: Bluetooth UART Module (hackster.io link)
In this lab we will connect a Bluetooth UART module to the robot and see how we can send data to the robot via Bluetooth.
- Lab 9: Bluetooth Remote Control Car (hackster.io link)
In this lab we will use the Bluetooth UART module and the UART interface implemented in lab 8 to build a remote-control system with it. An Android or PC app would act as the controller.