4. How To Use - rmullin7286/TFREC-IR-3G GitHub Wiki

Starting Up

The Pi Sensor app will start automatically if you added the autoStart.sh script to rc.local. Otherwise, you'll have to start up the app from the terminal by typing:

cd /path/TFREC-IR-3G/Pi_Sensor
sudo ./PiSensor

Once the app boots, you should notice that the screen will light up and display "Hello!" for a few seconds. Then you'll be taken to the main screen.

Follow a similar process with the Pi Hub depending on whether or not you set up auto start.

The Main Screen

The main screen is the screen that will display temperature readings. The reading will refresh every 1 second. The ambient temperature is the overall air temperature. The object temperature is the temperature of whatever object is in the field of view. When the user switches to the menu, the program will automatically store the last read temperatures into memory for use, so make sure that you have the desired readings before switching to the menu. When you are ready to go to the menu to log or use other features, hold down the SELECT button until the word "MENU" is displayed on the screen.

The Menu

The menu will have different options to choose from. Select one of the options you wish to use by scrolling left and right and pressing SELECT, or select the BACK option to be taken back to the main screen. In this tutorial, we'll go over the different options you can use.

Connect

This option will send a signal to the Pi Hub requesting a connection to the cell service. The Pi Hub will then initiate the sakis3G script to connect to your 3G provider. The Pi Hub should then send a return message letting you know whether or not it has successfully connected. You can also tell that the Pi Hub is connected if one of the LED lights on the 3G shield is blinking rapidly. If it is blinking slowly, that means that you are not connected.

NOTE: make sure to connect before you log anything so that the Pi Hub can set the right time for logging. Otherwise, you may get incorrect readouts.

Test

This is a quick test to test whether or not the Pi Hub is connected. The Pi Hub will ping the dropbox servers to see if there is a connection. It will then send a message to the Pi Sensor letting you know whether or not the Pi Hub is connected to the internet.

Log

This will send the last read measurements over the radio to the Pi Hub and the Pi Hub will log the measurements locally to an excel file, along with the signature of the Pi Sensor sending the measurement (see the SET SIG option for more information on signatures)

Auto Log

This is a new feature added in version 1.1.0. Use this to automatically log the files at a preset interval. To do this, select the AUTO LOG option in the menu. Then a prompt will appear and ask you to enter a set number of minutes between each log. Increase the number by 0.5 by pressing up, and decrease by pressing down. Once you have the number you want, press select. This will take you back to the main screen. You'll know that auto log is on if there is an 'A' in the top right corner of the screen. To exit auto log, hold SELECT. Once you've entered the menu, auto log will quit.

Upload

This will tell the Pi Hub to initiate the dropbox_uploader script. The script will then attempt to upload your locally stored files to the internet. The Pi Hub will let the Pi Sensor know whether or not this was successful.

Set Sig

This allows the user to set a unique signature on their device. This can be used to mark measurements in the excel sheet later so you know what it was you were measuring. For example, if you're measuring the temperature of an apple, you could set the signature "APPLE" so that later, when you view the excel sheet on Dropbox, you know what you were measuring. The Pi Sensor will automatically ask you to set a signature if you haven't done so already on your first attempt to log measurements.

Disconnect

This tells the Pi Hub to disconnect from the 3G service. Use this if you're in range of your registered WiFi network and would rather use that.

Update

This Feature is programmed in so that you can automatically update the Pi Sensor and Pi Hub to the latest version without ever having to plug into a monitor or keyboard. Simply make sure that your Sensor and Hub are within range of the registered WiFi network, and press UPDATE. The Sensor will send a signal to the Hub and the hub will download the most recent code directly from Github. Once it's complete, the Pi Sensor app will close and begin to update. Once the code is finished installing, the Pi Sensor will restart, and you'll be updated to the latest version.

Shutdown

Use this when you want to safely shut down the pi Sensor. Once the device is shut off, you can then disconnect the Pi from it's power source. The hub should be able to be shut down, but make sure that all requests have been processed first.

Back

This option takes you back to the main screen

Previous: Download and Install