In this project, we are required to
- Control motor to reach targeted rotation in both direction, with target speed ranging from 5 rps to 100 rps.
- Use pwm to generate melody
- Mining bitcoin while idle, at exact rate of 5000 nonces per second
Detailed requirement can be found from CW2-specification.pdf
.
src
folder contains all the source file,main.cpp
for bootstrapcommandParser.cpp
for parsing serial inputhashCracker.cpp
for hash crackingmotorController.cpp
for control motor's rotations, speed and melody
include
folder contains the header files for the source files (except main.cpp)- It also contains
dataStructure.hpp
for declaring shared data structure and constant across source files.
- It also contains
More details and critical time analysis can be found in the report.
- Follow PIO to install PIO on any platform you prefer.
Alternatively, open the root folder of this project in VSCode, install the recommended extension. - Plug in the mbed device, and run
upload
in PIO to upload to device.
If compile time is long (over 5 minutes), check.mbedignore
file in folderpio_core/packages/framework-mbed/components
are not overwritten.
Located under folder bin/firmware.bin