Mine arrived yesterday and all but worked out of the box, no errors on uploads either.
Using VS/Platformio, set to 5v on usb converter (3v did give errors at the end of uploading code but it did still work), disconnect any battery, make sure lora device is set to 3.3.v - as most ppl have said this is important. Connect DIO1 to D5, DIO2 not needed.
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 5, LMIC_UNUSED_PIN},
};
PlatformIO/ libraries uses too:-
[env:atmega328pb]
platform = atmelavr
board = pro16MHzatmega328
framework = arduino
upload_speed = 115200
monitor_speed = 9600
board_build.mcu = atmega328p
lib_deps =
; https://github.com/matthijskooijman/arduino-lmic
MCCI LoRaWAN LMIC library
https://github.com/rocketscream/Low-Power
https://github.com/sparkfun/SparkFun_HTU21D_Breakout_Arduino_Library
https://github.com/enjoyneering/BH1750FVI
https://github.com/LowPowerLab/SFE_BMP180
Don’t ask me about current usage, don’t have kit to measure on battery only. Sleep is working but because there are two leds on, plus the charger circuit too my USB current tester is mostly useless.
I’ve never burt a new bootloader so re the 16mhz/8mhz issue, I’m looking to others for guidance on this
I still think they are a nice cheap device, wants to drop to 8mhz, remove leds, then it need to be tested re current on battery only.
Red led always on when powered up.
Blue led always on when 5v applied, even with no battery, assume once change complete it drops off.
PS clean upload log below
Linking .pioenvs\atmega328pb\firmware.elf
Checking size .pioenvs\atmega328pb\firmware.elf
Building .pioenvs\atmega328pb\firmware.hex
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [======== ] 77.4% (used 1586 bytes from 2048 bytes)
PROGRAM: [======== ] 83.2% (used 25572 bytes from 30720 bytes)
Configuring upload protocol...
AVAILABLE: arduino
CURRENT: upload_protocol = arduino
Looking for upload port...
Auto-detected: COM12
Uploading .pioenvs\atmega328pb\firmware.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file ".pioenvs\atmega328pb\firmware.hex"
avrdude: writing flash (25572 bytes):
Writing | ################################################## | 100% 9.59s
avrdude: 25572 bytes of flash written
avrdude: verifying flash memory against .pioenvs\atmega328pb\firmware.hex:
avrdude: load data flash data from input file .pioenvs\atmega328pb\firmware.hex:
avrdude: input file .pioenvs\atmega328pb\firmware.hex contains 25572 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 8.59s
avrdude: verifying …
avrdude: 25572 bytes of flash verified
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
avrdude done. Thank you.