-
1Assembly:
- there is nothing special, I build 20 prototypes, with hand soldering, without issues
I am not saying best, they are just my steps :
- Solder CPU, and all active/passive components
-
2Setup Arduino IDE and bootloader
- I am using Atmel-ICE, I have no idea about another way how to program bootloader now!
Arduino > Preferences : Additional boards manager URLs
ADD https://www.mattairtech.com/software/arduino/beta/package_MattairTech_index.jsonArduino > Tools > Boards manager : MattairTech MT-D21E (rev B)
Arduino > Tools > Clock > Source : INTERNAL_OSCILLATOR
Arduino >Tools > Serial config : ONE_UART_ONE_WIRE_TWO_SPIConnect GND, VCC, SWC, SWD, Reset to ATMEL-ICE
Arduino > Tools > Programmer : ATMEL-ICE
Arduino > Tools > BURN BOOTLOADER- Now you can upload sketches with USB
Or second option:
From Atmel Studio write special ARMABOT.bin then you can easy upload firmwares drag&drop
-
3Upload first firmware
- Connect Armachat to computer via USB
- double press RESET button for bootloader activation
- display start flashing (breathing)
- copy first.uf2 to freshly displayed mass storage drive
- wait for writing
- press RESET again
If you hear BEEP firmware is running
-
4Solder last components
- solder display, power on armachat, if you see messages it is COOL
if is display is white try press/hold RESET button - if display is working you can remove stick tapes and glue to main board
if not check flex cable connection - solder RFM95 radio module power on armachat, if you see Lora init OK
If not check radio module connection - at last solder buttons and SMA antenna connector
- solder display, power on armachat, if you see messages it is COOL
-
5Libraries
- Download libraries
https://playground.arduino.cc/Code/Keypad/
https://github.com/adafruit/Adafruit-GFX-Library
https://github.com/adafruit/Adafruit-ST7735-Library
https://github.com/sandeepmistry/arduino-LoRa
https://github.com/cmaglie/FlashStorage #include <Keypad.h> #include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_ST7789.h> // Hardware-specific library for ST7735 #include <Adafruit_ST7735.h> // Hardware-specific library for ST7735 #include <SPI.h> // include libraries #include <LoRa.h> #include <FlashAsEEPROM.h>
- Download libraries
-
6Write firmware
Source code is here
Upload
Known display bug "feature"
Because I want keep use only SAMD21E18 and I miss about 4-5 GPIO "FEATURES" LORA and LCD RESET are controlled with RESET button, sometime usually at first run is display blank - you need press reset button several times LCD CS - connected to GND ... same troubles as above Battery monitoring, because I have no free GPIO for measuring battery voltage I using small trick > measuring supply voltage, but you always read 3.3V until battery voltage drop below 3.3V you can think battery is LOW, or etc under 3.0V you can make EXTREME LOW status. Possible solution - do not use UART and I2C to get enough GPIO - another MCU - I2C expander (I not want solve because I LOVE project SIMPLICITY)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.