- This topic has 1 reply, 2 voices, and was last updated 2 years, 5 months ago by .
- You must be logged in to reply to this topic.
Home › Forums › The libraries hosted on the site › EByte LoRa e220 UART devices LLCC68 › Go to sleep after sending data – safeguarding
Hi,
I realised that if you use the commands:
ResponseStatus rs = e220ttl.sendMessage(&struct1, sizeof(struct1));
Serial.print(rs.getResponseDescription());
and even if the outcome is “Success” it does NOT mean the message was sent.
The only way to make sure transmission is finished is to observe AUX input – it takes around 360ms and (probably) it depends on the amount of data to be sent:
#define AUX xx
pinMode(AUX,INPUT);
while (digitalRead(AUX) == 0) {}
and once it is LOW, you can safely send E220 to sleep, i.e. this way:
#define M0 19
#define M1 21
pinMode(M0, OUTPUT);
pinMode(M1, OUTPUT);
digitalWrite(M0, 1);
digitalWrite(M1, 1);
Hi Zygfryd,
sorry if I answer only now. Yes, if you set AUX, you get better optimization in terms of time, if you don’t set AUX, I use an arbitrary amount of time that covers the wide case with minimum time, but It can be possible that not all if you have an issue in a particular aspect I advise adding a delay to be sure of the sending.
Bye Renzo
More
Just like a well-organized workbench, this website uses cookies to function properly and efficiently.
🛠️ The Essentials (Necessary): Some cookies are categorized as necessary and are stored on your browser because they are critical for the basic working of the site.
📊 The Analytics (Third-party): We also use third-party cookies to help us analyze traffic and understand which projects you like the most. These are stored only if you give us the green light.
You can choose to opt-out, but keep in mind that disabling them might make the site experience a bit less "smooth".
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
