Browse Source

AXP ADC Config

pull/10/head
Łukasz Nidecki 1 year ago
parent
commit
1e54409450
  1. 1
      .gitignore
  2. 10
      src/TTGO_T-Beam_LoRa_APRS.ino
  3. 6
      src/TTGO_T-Beam_LoRa_APRS_config.h

1
.gitignore vendored

@ -3,3 +3,4 @@
.piolibdeps
.clang_complete
.gcc-flags.json
.idea

10
src/TTGO_T-Beam_LoRa_APRS.ino

@ -334,6 +334,8 @@ void setup(){
axp.setPowerOutPut(AXP192_EXTEN, AXP202_ON);
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON);
axp.setDCDC1Voltage(3300);
axp.adc1Enable(0xfe, true);
axp.adc2Enable(0x80, true);
if(!display.begin(SSD1306_SWITCHCAPVCC, SSD1306_ADDRESS)) {
for(;;); // Don't proceed, loop forever
@ -517,7 +519,7 @@ void loop() {
#ifdef KISS_PROTOCOLL
#ifdef KISS_DEBUG
static auto last_debug_send_time = millis();
if (millis() - last_debug_send_time > 1000*10) {
if (millis() - last_debug_send_time > 1000*5) {
last_debug_send_time = millis();
String debug_message = "";
debug_message += "Bat V: " + String(axp.getBattVoltage());
@ -526,7 +528,7 @@ void loop() {
debug_message += ", ";
debug_message += "Bat OUT A: " + String(axp.getBattDischargeCurrent());
debug_message += ", ";
debug_message += "Bat %: " + String(axp.getBattPercentage());
debug_message += "USB Plugged: " + String(axp.isVBUSPlug());
debug_message += ", ";
debug_message += "USB V: " + String(axp.getVbusVoltage());
debug_message += ", ";
@ -535,6 +537,10 @@ void loop() {
debug_message += "Temp C: " + String(axp.getTemp());
Serial.print(encapsulateKISS(debug_message, CMD_HARDWARE));
#ifdef ENABLE_BLUETOOTH
SerialBT.print(encapsulateKISS(debug_message, CMD_HARDWARE));
#endif
}
#endif
#endif

6
src/TTGO_T-Beam_LoRa_APRS_config.h

@ -6,11 +6,11 @@
// USER DATA - USE THESE LINES TO MODIFY YOUR PREFERENCES
#define KISS_PROTOCOLL // If enabled send and receive data in SIMPLE KISS format to serial port
#define CALLSIGN "SQ9MDD-11" // enter your callsign here - less then 6 letter callsigns please add "spaces" so total length is 6 (without SSID)
#define CALLSIGN "SQ5RWU-11" // enter your callsign here - less then 6 letter callsigns please add "spaces" so total length is 6 (without SSID)
#define DIGI_PATH "WIDE1-1" // one hope please (WIDE1-1)
#define APRS_SYMBOL_TABLE "/"
#define APRS_SYMBOL "[" // other symbols are: "[" => RUNNER, "b" => BICYCLE, "<" => MOTORCYCLE, "R" => Recreation Vehicle
#define MY_COMMENT "test trakera LORA" // add your coment here - if empty then no comment is sent
#define MY_COMMENT "Qyon testuje trakcer LORA" // add your coment here - if empty then no comment is sent
//#define SHOW_ALT // send Altitude in frame
#define SHOW_BATT // send battery voltage at the end of comment (we need beggining for QSY message format)
#define SHOW_RX_PACKET // uncomment to show received LoRa APS packets for the time given below
@ -20,6 +20,6 @@
//#define SHOW_GPS_DATA // uncomment to show on serial port, received data from GPS and debug information
#define ENABLE_BLUETOOTH
//#define BLUETOOTH_PIN "0000"
#define KISS_DEBUG
//#define KISS_DEBUG
unsigned long max_time_to_nextTX = 180000L; // TRANSMIT INTERVAL set here MAXIMUM time in ms(!) for smart beaconing - minimum time is always 1 min = 60 secs = 60000L !!!
Loading…
Cancel
Save