LoRa Ürünleri Satın AL

Çözüldü156 görüntülenmeLoraconfiguration lora30d
0

Hocam Merhabalar, elimde e32 433 t30d modülü var ve arduino uno ve nano ile iletişim kurmaya çalışıyoruz. Nanoda modüle harici besleme yapıyoruz. Kütüphanedeki örnek koddan config etmeye çalıştığımız kodum bu.  Power için 30’u kabul etmiyor. o yüzden 20’ye çektim. M0 ve m1’i 3.3v ve 5v’de denesek de config yapıldı olarak portta gözüküyor fakat yine örnek kodlardan aldığım get config koduyla farklı değerler gözüküyor. Ne yapmam gerekiyor ? teşekkür ederim

#include "Arduino.h"<br />#include "LoRa_E32.h"<br />#define FREQUENCY_433<br />#define E32_TTL_1W <br />LoRa_E32 e32ttl100(11,10); // e32 TX e32 RX<br />void printParameters(struct Configuration configuration);<br />void printModuleInformation(struct ModuleInformation moduleInformation);<br /> void setup() {<br />  Serial.begin(9600);<br />  delay(500);<br />   // Startup all pins and UART<br />  e32ttl100.begin();<br />   ResponseStructContainer c;<br />  c = e32ttl100.getConfiguration();<br />  // It's important get configuration pointer before all other operation<br />  Configuration configuration = *(Configuration*) c.data;<br />  Serial.println(c.status.getResponseDescription());<br />  Serial.println(c.status.code);<br />  Serial.println(configuration.SPED.getUARTBaudRate());<br />   printParameters(configuration);<br />  configuration.ADDL = 0x00;<br />  configuration.ADDH = 0x00;<br />  configuration.CHAN = 0x17;<br />   configuration.OPTION.fec = FEC_1_ON;<br />  configuration.OPTION.fixedTransmission = FT_TRANSPARENT_TRANSMISSION;<br />  configuration.OPTION.ioDriveMode = IO_D_MODE_PUSH_PULLS_PULL_UPS;<br />  configuration.OPTION.transmissionPower = POWER_30;<br />  configuration.OPTION.wirelessWakeupTime = WAKE_UP_250;<br />   configuration.SPED.airDataRate = AIR_DATA_RATE_010_24;<br />  configuration.SPED.uartBaudRate = UART_BPS_9600;<br />  configuration.SPED.uartParity = MODE_00_8N1;<br />   // Set configuration changed and set to not hold the configuration<br />  ResponseStatus rs = e32ttl100.setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE);<br />  Serial.println(rs.getResponseDescription());<br />  Serial.println(rs.code);<br />  printParameters(configuration);<br />  c.close();<br />}<br /> void loop() {<br /> }<br />void printParameters(struct Configuration configuration) {<br />  Serial.println("----------------------------------------");<br />   Serial.print(F("HEAD : "));  Serial.print(configuration.HEAD, BIN);Serial.print(" ");Serial.print(configuration.HEAD, DEC);Serial.print(" ");Serial.println(configuration.HEAD, HEX);<br />  Serial.println(F(" "));<br />  Serial.print(F("AddH : "));  Serial.println(configuration.ADDH, BIN);<br />  Serial.print(F("AddL : "));  Serial.println(configuration.ADDL, BIN);<br />  Serial.print(F("Chan : "));  Serial.print(configuration.CHAN, DEC); Serial.print(" -> "); Serial.println(configuration.getChannelDescription());<br />  Serial.println(F(" "));<br />  Serial.print(F("SpeedParityBit     : "));  Serial.print(configuration.SPED.uartParity, BIN);Serial.print(" -> "); Serial.println(configuration.SPED.getUARTParityDescription());<br />  Serial.print(F("SpeedUARTDatte  : "));  Serial.print(configuration.SPED.uartBaudRate, BIN);Serial.print(" -> "); Serial.println(configuration.SPED.getUARTBaudRate());<br />  Serial.print(F("SpeedAirDataRate   : "));  Serial.print(configuration.SPED.airDataRate, BIN);Serial.print(" -> "); Serial.println(configuration.SPED.getAirDataRate());<br />   Serial.print(F("OptionTrans        : "));  Serial.print(configuration.OPTION.fixedTransmission, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getFixedTransmissionDescription());<br />  Serial.print(F("OptionPullup       : "));  Serial.print(configuration.OPTION.ioDriveMode, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getIODroveModeDescription());<br />  Serial.print(F("OptionWakeup       : "));  Serial.print(configuration.OPTION.wirelessWakeupTime, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getWirelessWakeUPTimeDescription());<br />  Serial.print(F("OptionFEC          : "));  Serial.print(configuration.OPTION.fec, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getFECDescription());<br />  Serial.print(F("OptionPower        : "));  Serial.print(configuration.OPTION.transmissionPower, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getTransmissionPowerDescription());<br />   Serial.println("----------------------------------------");<br /> }

Soru yeni cevaplara kapalıdır.
En iyi cevap olarak seçildi