Tweaking Installer Scripts

Since the sensor software is working fairly well, I’m making sure the installer scripts are where they should be. I want to be able to flash Raspbian, download the installer script, run it and have everything just work. So to that end, I made the following changes.

To start, I added in the CLI commands to enable SPI and i2c in the installer script, along with the rfkill unblock wifi to enable wifi on the Pi Zeros (Didn’t seem necessary on the Pi3B+, just the country code allowed it to work). I have also added a function in the Enviro+ sensor module to enable the serial connection for the PSM5003, if it is enabled. The only downfall of the PSM5003 settings is the system has to reboot before it takes effect. So if you enable the PSM5003, you need to allow the program to start up, then reboot the system. It also leaves a warning message in the primary log to reboot.

Thanks to the above-mentioned additions, you can just flash a fresh Raspbian image, download and run the Sensor installer script and everything starts to work! If you have the desktop version of Raspbian installed, there is even a shortcut to the web config in the menu that points to localhost. If you use the lite version of Raspbian without a desktop, you’ll need to access the web configuration from another device (computer, phone, tablet, etc) through its actual IP address OR run the edit-config script locally (Although the script to edit configurations just opens the text files, so it’s not as nice as the web interface).

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>