05 January, 2019

Raspberry Pi and 3d printed Rain meter - Part 1

See the Introduction.


As a side note:
This is where I buy my components from. Luckily I had them all already.
  1. G T Electronic Components
  2. Roleen Electronic Components
  3. Micro Robotics  (In Centurion) 
Steps as proof of concept
  1. I downloaded Raspbian Stretch Lite  from the official web site.
    I downloaded the lite version as I have no need for a desktop.
  2. I downloaded  Etcher from their web site.
  3. 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.
  4. I booted up the pi, and all was well.
  5. I then enabled wifi, and remote ssh login.
  6. I then created a new user for myself to log in with rather than the "pi" user.
  7. 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.
    1. I built my little circuit on a breadboard.
       
    2.  I then created a new folder in my home folder on the pi called "hallsensortest" by executing this command:
      mkdir hallsensortest
    3.  Go into the folder by
      cd hallsensortest
    4. And then executing the command to get the python script from bitbucket

      wget https://bitbucket.org/MattHawkinsUK/rpispy-misc/raw/master/python/hall.py
    5. 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.
    6. 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.

Next step is to get this working in dotNet core.

No comments: