This folder contains quick hardware/IO test scripts and sample assets.
test/python/gpio/- Raspberry Pi GPIO tests (ultrasonic / servo / relay / camera)test/python/serial/- Serial tests (Raspberry Pi <-> Arduino)test/python/integration/- Integration tests (serial + camera)test/cpp/- C++ experiments/teststest/assets/images/samples/- Sample images committed to the repotest/assets/images/captures/- Runtime captures (gitignored)
test_all.py- Combined GPIO flow (ultrasonic + relay + servo + camera capture)test_cam.py- Ultrasonic + camera capture scripttest_relay.py- Relay on/off loop testtest_servo.py- Ultrasonic-triggered servo movement testtest_u.py- Ultrasonic distance print testtest_ultrasonic_and_servo.py- Ultrasonic + servo combined test
read_distance.py- Read distance lines from serial and printDistance: <value> cmsend_hello.py- Send oneHello from RPimessage over serialread_0_1.py- Read and print0/1values from serial
test_rpi_and_r3.py- Serial + camera integration with relay/servo commands
Run from repository root:
python test/python/serial/read_distance.py
python test/python/serial/send_hello.py
python test/python/serial/read_0_1.py
python test/python/gpio/test_u.py
python test/python/integration/test_rpi_and_r3.py- Scripts that use
RPi.GPIOand/orcv2may print a message and exit if those modules are not installed. - Serial scripts may print a message and exit if
pyserialis not installed. test_all.pywrites captures totest/assets/images/captures/by default.test_cam.pyandtest_rpi_and_r3.pysaveimg_*.jpgto the current working directory.