With logging: atmega works for sensor to send, receive does not #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this code the sensor LED will blink several times if it does not get a good response when reading the LoRa module.
When the sensor button is pressed, a message is sent to the hub. Debug prints from the hub show that the message is received and that the hub responds with the correct message.
However, the sensor reports 7 flashes. This indicates that the string the sensor got from LoRa was not one of these:
+OK
or a string that starts with+RCV
I added a delay of one second between LoRa_Serial.Available and LoRa_Serial.ReadString but that did not help. The next step might be to try this code in a Photon2 just to see that it does work there. This code has
#define PARTICLEPROCESSOR 0
in tpp_LoRa.h Set the define to 1 if running on a Particle processor.