Microcontrollers,  raspberry pi

Starting With a Raspberry Pi Zero W

While there are steps with the atMega waiting to be posted, let’s turn attention briefly to the Raspberry Pi. In particular, I have a Zero WH–the small one with wireless built in, and the headers pre-soldered by Adafruit. (OK, I have a couple more, as you might have expected, but that’s not the point today.).

The atMegas are plenty for the deployments about the yard, but have rather limited storage. I want to have logs, and give direction to the little circuits, so more power–or at east more storage–is needed. The Pi Zero W has a 1ghz single core CPU, 512mb ram, and built in bluetooth ad wifi. I’ve added an 8gb microsd for “disk”–it doesn’t need that much, but that’s where the sweet spot was the day I ordered it. Just about any other pi with built in or added wifi & bluetooth would do what we need for this project.

The operating system may be downloaded here. I chose the “Lite” simply because I tend to assume that everything will have to be upgraded and replaced anyway, but also because I don’t anticipate using a desktop interface.

Now open your image, and create the file /mount/etc/wpa_supplicant/wpa_supplicant.conf (assuming you mounted on /mount. Substitute appropriately). Mine looks like


ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

network={

ssid="myNetworkName>

<p>psk="myPassphrase"

key_mgmt=WPA-PSK

} 

I have seen several sources stating to create an empty fie named “ssh” in the root directory of the target (i.e., “/mount” while mounted), but I am reasonably certain that I did not do this. If I did, it was deleted when found and ssh configured accordingly. *Supposedly* much an action is necessary since sometimes in 2016.

At this point, you should be able to simply dismount the card, put it into the raspberry, apply power, and wait for it to come up. You may log in with user “pi” and password “raspberry”. The use of this account appears preferable, as it is enabled for use of much of the hardware and tools provided. Alternatively, you can go through the effort of changing these yourself.

Finally, it will be useful to set you system name in /etc/hostname (I used “sprinklers”, it’s destiny), and to reserve an ip address on your router, so that you can ssh to it by name from your regular computer.

Leave a Reply

Your email address will not be published. Required fields are marked *