A place for all the arduino code I write.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
2.0 KiB

5 years ago
  1. # arduino
  2. > A place for all the Arduino code I write.
  3. A collection of projects and example code for various Arduino-related devices.
  4. My goal here is to make sure that everything is documented clearly enough that it should be a fairly easy and frustration-free experience picking up a project from here and running it. To that end, if you experience any difficulties - please contact me! Methods to get in touch are detailed on [my website](https://starbeamrainbowlabs.com/).
  5. ## Libraries
  6. For some reason, the Arduino IDE is absolutely _ridiculous_ in that it keeps libraries globally installed. Some of the projects and examples here require that libraries are installed to work, unfortunately (I wasn't able to get them to function any other way :-/). To that end, I've listed below the libraries and where to get them from that I've used.
  7. ### RadioHead
  8. Used in some of the low-level LoRa test programs. This requires cloning the _RadioHead_ repository into the Arduino IDE libraries folder, which is by default located at `~/Arduino/libraries`. Here's the clone command in question:
  9. ```bash
  10. git clone https://github.com/PaulStoffregen/RadioHead.git
  11. ```
  12. Execute it in the Arduino libraries folder as mentioned above.
  13. ### LMIC
  14. Required for the LoRaWAN projects. Installable through the _library manager_ if you search `LMIC`.
  15. In addition, for some reason the author of this library has made a very bad design choice, in that you've got to alter the _original library code_ in order for it to work. Navigate to the Arduino IDE's library folder (by default `~/Arduino/libraries`), enter the `MCCI_LoRaWAN_LMIC_library` directory, and then open `src/lmic/config.h` for editing. You want to uncomment line 50, which should read like so once uncommented:
  16. ```c
  17. #define CFG_sx1276_radio 1
  18. ```
  19. ## Useful Resources
  20. - [Connect with WPA](https://www.arduino.cc/en/Tutorial/ConnectWithWPA) - What seems like a reasonaly good tutorial on how to get a Wemos to connect via WiFi. We'll need a TCP tutorial later on down the line though.