The T-Deer Pro Mini LoRa Atmega328P by LILYGO® is a compact microcontroller board that integrates the power of the ATmega328P processor with LoRa (Long Range) wireless communication capabilities. This board is ideal for Internet of Things (IoT) projects, remote sensor networks, and any application requiring long-range, low-power wireless communication.
Pin Number | Function | Description |
---|---|---|
1 | Reset | Reset pin, active low |
2-13 | Digital I/O | Digital input/output pins |
14 | Analog In 0 | Analog input pin 0 |
15 | Analog In 1 | Analog input pin 1 |
... | ... | ... |
19 | Analog In 5 | Analog input pin 5 |
20 | AREF | Analog reference voltage for the ADC |
21 | GND | Ground |
22 | A6 (D4) | Additional analog input (not on DIP package) |
23 | A7 (D5) | Additional analog input (not on DIP package) |
24 | 3.3V | 3.3V power supply pin |
25 | RST | Reset pin for LoRa module |
26 | NSS | SPI Chip Select for LoRa module |
27 | MOSI | SPI Data Input for LoRa module |
28 | MISO | SPI Data Output for LoRa module |
29 | SCK | SPI Clock for LoRa module |
30 | GND | Ground for LoRa module |
31 | 3.3V | 3.3V power supply for LoRa module |
32 | DIO0 | Digital I/O for LoRa module (interrupt) |
33 | DIO1 | Digital I/O for LoRa module (interrupt) |
Q: Can I use the T-Deer Pro Mini LoRa with the Arduino IDE?
Q: What is the maximum range I can achieve with the LoRa module?
Q: How can I save power for battery-operated projects?
#include <SPI.h>
#include <LoRa.h>
// Define the pins used by the LoRa module
#define SS 10
#define RST 9
#define DI0 2
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("LoRa Sender");
// Initialize LoRa module
LoRa.setPins(SS, RST, DI0);
if (!LoRa.begin(868E6)) { // Set frequency to 868 MHz
Serial.println("Starting LoRa failed!");
while (1);
}
}
void loop() {
Serial.print("Sending packet: ");
Serial.println(counter);
// Send a message to indicate which packet number is being sent
LoRa.beginPacket();
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();
counter++;
delay(5000); // Wait for 5 seconds before sending the next packet
}
This example code is for a simple LoRa sender. Ensure that the pin definitions match the connections on your T-Deer Pro Mini LoRa board. Adjust the frequency according to your regional standards and the board's specifications.