Signed in as:
filler@godaddy.com
Signed in as:
filler@godaddy.com
Plug in the screw terminal blocks and the USB-C cable into the USB connector on the Panther Logger (see video on right). Plug the other end into your computer's USB port.
Use of a battery at this point is optional, but you will need one to use a cellular modem. See our battery recommendations page here. You will need to remove any connector from the battery wires if it came with one (e.g. JST is common), strip 1 to 2 centimeters of insulation off the wires and plug them into the battery screw terminal block on the Panther Logger with the positive wire on the right side (as indicated by plus sign on the board). Do not cut both wires at the same time. When a battery is plugged in, the power indicator LED will turn on if USB or solar power is applied.
Note: there is a small rectangular cutout in the board near the battery connector to allow passage of battery wires through the board if the battery is to be installed behind the board.
Download and install the Arduino IDE here for Windows, macOS, or Linux. The current latest versions are Arduino 2.X, which came with some big changes from 1.X. Some of our tutorials use the older version so keep in mind things might look a bit different. The board can also be programmed in other free software like Microsoft VS Code with PlatformIO installed.
After installing, open the Arduino IDE and go to Arduino>Settings on macOS or File>Preferences on Windows and Linux. Follow the instructions at Adafruit.com here to setup the Arduino IDE for use with Feather M0 boards . You will need to add Adafruit boards support in the Arduino preferences and then install Adafruit and Arduino SAMD boards from the Arduino boards manager (see video on right). When finished, close and re-open the Arduino IDE. In the video we show how to arrange windows to upload a sketch to the Panther Logger and monitor serial output.
In the menu at the top of the Arduino IDE go to Tools>Board>Adafruit SAMD Boards and select Adafruit SAMD21.
Then go to Tools>Port and select the port where the Panther Logger is connected which will be labeled as "Adafruit Feather M0."
See here for other notes on connecting a board to the Arduino IDE.
Go to our Github page for our Blink script here. Click the copy button in the upper right to copy the code then go to Arduino IDE and click file>new to make a new sketch. Highlight the default code that is there and erase it or just paste over with the code copied from Github. Save this new sketch as a new file name.
If you are not familiar with the basic structure of an Arduino C/C++ script read here.
As you can see from this sketch, we try to provide lots of notes in all of our sketches to indicate what is happening. These notes or comments follow two forward slashes "//" or are written in between slash-star and star-slash... like this:
/*
this is a note, it is not code
*/
The blink script will blink three of the four indicator LEDs in sequence and then blink them all together.
We are now ready to upload this code to the Panther Logger. Ensure that the board is selected under the Tools>port menu and then click the upload button in the top menu area which looks like an arrow pointing to the right.
NOTE: In the port menu the board will show up as "Adafruit Feather M0" because we are using that bootloader. If you do not see this then ensure that the board's power switch is on and that the USB cable is connected.
If upload fails then click the reset button on the Panther Logger board once and then double click it. The top red LED, LED1, turns on and begins to slowly fade or pulse in and out. The processor is now in bootloader mode and the code should upload at this point. The Arduino IDE will normally reset the microprocessor before sending code updates, but sometimes this fails to happen. By clicking and double clicking the reset button we are manually stopping any program that is running and then putting the processor into a state where it is ready to accept new code.
After uploading the script, the LEDs on the board will blink in sequence and then blink together. Open the serial monitor with the magnifying glass button on the top right of the Arduino IDE window. The script will print messages to the monitor indicating which LED is blinking.
If all goes well then you have successfully uploaded code to the Panther Logger and are on your way to using the full functionality of this device.
The blink script includes some functions to create a new I2C port or Wire on digital pins 3 and 4 of the Panther Logger's processor. We have written the Panther Library which includes these functions so we do not need to keep writing them into every script.
Go to our Github site for the Panther Library here. Click on the "Code" button and choose to download a zip file. Unzip the file and remove the "-main" from the folder name so it is just called "Panther." Move the "Panther" folder to your Arduino libraries folder, which should be at My Documents>Arduino>libraries on Windows or Documents>Arduino>libraries on MacOS.
Restart the Arduino IDE. Go to the File menu and examples. Scroll down to Panther and you will see the "Blink_PantherLib" example script. Take a look at the code. We include the Panther.h library at the top of the script. Then we instantiate the library with:
Panther ptr;
And then we can call functions in the Panther class with ptr. We also need to run the begin function in setup with:
ptr.begin();
Then we can use functions in the library. In this case we use the ptr.LED function to turn on and off various LEDs within our own custom made flashLED function.
The Panther Logger contains a temperature and humidity sensor on the board just below terminal blocks one and two (see image to the right). Lets use the Panther Library to read the onboard temperature and humidity sensor. Open the example script for the Panther Library called "PanelTempHumidity" and upload it to the Panther Logger. Temperature and humidity data will be printed to the Serial monitor every few seconds.
Basic Coding Info:
The functions pTemp(); and pHumid(); are used to read the sensor. Note that the library is instantiated with:
Panther ptr;
So the sensor functions are written as:
ptr.pTemp();
ptr.pHumid();
They return a float so we store them in float value like this:
float Temp = ptr.pTemp();
float Humid = ptr.pHumid();
Note that in order to the use the library we also need to add the begin function early in setup:
ptr.begin();
We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.