As a side note:
This is where I buy my components from. Luckily I had them all already.
- I downloaded Raspbian Stretch Lite from the official web site.
I downloaded the lite version as I have no need for a desktop.
- I downloaded Etcher from their web site.
- Since my Pi had an existing 4Gig SD Card I just used that, and put the image on the SD card following the instructions from here.
- I booted up the pi, and all was well.
- I then enabled wifi, and remote ssh login.
- I then created a new user for myself to log in with rather than the "pi" user.
- I then searched google for "hall sensor raspberry pi" and found this web site. and followed all the instructions there, but will repeat them here for clarity in my own words.
- I built my little circuit on a breadboard.
- I then created a new folder in my home folder on the pi called "hallsensortest" by executing this command:
- Go into the folder by
- And then executing the command to get the python script from bitbucket
- Since I had logged in using my own user name (and not pi [good security practice]) I had to execute:
sudo python hall.py
The reason for the sudo is to gain access to the GPIO pins with elevated privileges.
- Then all that was left to do is test it. I got a magnet and waved it in front of the hall sensor, and the screen updated accordingly.