-
1Hardware
Connect the FRAM and your GPS module to the raspberry PI pico. Debug!
Connect the big red button and the buzzer.
I connected the red button to GP0 and GND. I connected the red LED part to GP1 and GND (in the code, the button is lit up, but turns off when you press it!).
The buzzer is connected across GP2 and GND (pay attention to the polarity of the buzzer).
The FRAM is connected to I2C0 on GP17 and GP16.
The GPS is connected to UART0 on GP12 and GP13.
-
2Coding
Please see github...
-
3Using the FRAM
This FRAM module is nice because it has very high endurance for log files.
As an introduction, I included mount_FRAM.py as an example to the github page.
When you first use the FRAM, run the "mount_FRAM.py" program, but uncomment the line
os.VfsFat.mkfs(fram)
This will create the FAT filesystem on the FRAM.
Once the script is done, then in Thonny, you can browse to the new "FRAM" folder (make sure you go to View->Files menu to make sure you can see the files on the rasperry pi pico).
You might need to click the hamburger button, and "refresh".
-
4Read the gps_pothole.txt file
Once you have your potholes, then simply open gps_pothole.txt in the /fram folder, and copy your pothole locations to your city representative.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.