-
Notifications
You must be signed in to change notification settings - Fork 0
Software
Cara Walter edited this page Jul 27, 2023
·
14 revisions
- Follow the LoomV4 installation steps.
- Use Loom4 version committed June 13, 2023 (63b8fd5) or later by downloading repository and replacing Loom library folder contents at (for Windows)
C:\Users\_____\AppData\Local\Arduino15\packages\loom4\hardware\samd\4.3.0\libraries\Loom
with the repository folder. - Clone the LilyPad repo to the Arduino folder with:
git clone https://github.com/OPEnSLab-OSU/Lilypad
or by downloading as a zip archive and unzipping. - Move the Adafruit_VEML7700_library_Altered folder to your computer's Arduino libraries folder.
- Inside the Arduino IDE Library Manager, install the OneWire (tested with version 2.7.3) and DallasTemperature (tested with version 3.9.0) libraries.
- Modify the ArduinoMqttClient library according to issue 53: replace != condition with < in line 213 of ArduinoMqttClient/src/MqttClient.cpp.
- In the Arduino IDE go to
File > Examples > Loom > Lab Examples > WC_FastRegister
or get the most recent version from Github. - Set the
MOBILE_NETWORK_OPERATOR
on line 20 to one of the options listed in lines 15-19. - Lookup the appropriate Mobile Country Code (MCC) and Mobile Network Code (MNC) for the carrier in your deployment location.
- For the op structure (currently on lines 103-107 and setup for AT&T), change the
op.shortOp
andop.longOp
to match the name of the carrier you have selected, and theop.numOp
to match the combined MCC and MNC.
-
Upload the file to a Feather MO stacked on the LTE board, and open the serial monitor when completed. If using without a serial monitor connection, first comment out the
while (!Serial.available());
on line 74. -
If using the serial monitor, the following messages confirm successful initialization (italicized variable names will be replaced by ones of your choice). Alternatively, the blue LED on the 4G board will only flash once registered.
- Set mobile network operator to MOBILE_NETWORK_STRINGS[MOBILE_NETWORK_OPERATOR]
- APN successfully set
- Network op.longOp registered
- Open
src/LilyPad4G/LilyPad4G.ino
from the folder you cloned or downloaded from the Github repository. - Modify the COLLECTION_NAME on line 13 to match the device e.g. LP1. This will be how the device will be identified on MongoDB.
- Modify the third entry in the Loom_Hypnos hypnos object creation on line 38 to match the time zone the device will be deployed in. The list of options is available from the Loom library.
- In the
arduino_secrets.h
file, replace the text bracketed by underscores with the correct values for your broker.
/* arduino_secrets.h */
#define NETWORK_APN "hologram"
#define NETWORK_USER ""
#define NETWORK_PASS ""
#define SECRET_BROKER "_put.your.secret.broker.here_"
#define SECRET_PORT _1234_
#define DATABASE "_Database_Name_"
#define BROKER_USER "_Username_"
#define BROKER_PASS "_Password_"
- Verify the code
- Plug in the Feather M0
- Choose the Loomified Feather M0 board profile
- Choose the port the Feather is connected to.
- Upload the code.
OPEnS Lab - Lilypad wiki