After Arduino Uno sleep mode SLEEP_MODE_PWR_DOWN serial data is read incorrect #21
Replies: 3 comments 6 replies
-
Software Serial probably already has a ISR attached to the pin and you just overwrote it. Arduino doesn't have cascading ISR, so you have to do it yourself, which problematic at best. When you go to register, first grab the ISR that is already present and store it, in your ISR, after you do your stuff, then call the stored method. |
Beta Was this translation helpful? Give feedback.
-
So I read more about what you said. These options I have in mind:
I have a question about storing ISR, do you have an example for it? I have basically no C++ background is a lot of thing are confusing when coming from Java background. |
Beta Was this translation helpful? Give feedback.
-
Another hardware solution, jumper the RX pin to another available pin at the same time, and attach your ISR (Interrupt Service Routine) to that pin so you are not sharing the config on the pin itself. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to make a cat feeder for my cats. Everything works just fine without implementing sleep mode... I tried implementing sleep mode to save my electric bill and batteries... But unfortunately I can not find a way to do it. Until the first sleep reader is working fine, then it stops working. Even if it reads some kind of id, value of it is incorrect. I have moved serial reading part to loop() method. What I am doing wrong or what can I try to make it work... ? I do not have any electrical engineering background so any help would be very appreciated.
Here are some serial logs:
3:43:16.129 -> Rfid13Ar�ե������k�going to���eep... 23:43:34.066 -> Arduino���ke up! 23:43:34.066 -> Arduino���ke up! 23:43:34.066 -> Arduino���ke up! 23:43:34.066 -> Arduino���ke up! 23:43:35.811 -> Arduino���ke up! 23:43:35.811 -> Arduino woke up! 23:43:35.843 -> Arduino woke up! 23:43:35.843 -> Arduino woke up! 23:43:35.843 -> Arduino woke up! 23:43:35.843 -> Working 23:43:35.843 -> Rfid134_Error_None 23:43:35.843 -> Rfid134_Error_PacketEndCodeMissmatch 23:43:35.843 -> Rfid134_Error_Packe� ���cksum 23:43:37.718 -> Rfid����_Error_PacketChecksumInvert 23:43:37.752 -> 83821369977 23:43:37.752 -> Arduino woke up! 23:43:37.752 -> Arduino woke up! 23:43:37.752 -> Working 23:43:37.752 -> Rfid134_Error_None 23:43:37.752 -> Rfid134_Error_PacketEndCodeMissmatch 23:43:37.752 -> Rfid134_Erro���acketChecksum �He�id134_Error_Pac����ChecksumInvert 23:43:39.538 -> 17840194 23:43:39.580 -> Arduino woke up! 23:43:39.580 -> Arduino woke up! 23:43:39.580 -> Arduino woke up! 23:43:39.580 -> Working 23:43:39.580 -> Rfid134_Error_None 23:43:39.580 -> Rfid134_Error_PacketEndCodeMissmatch 23:43:39.580 -> Rfid134_�Q.�or_PacketChecks�W�� 23:43:41.161 -> Rfid134_Error_���ketChecksumInvert 23:43:41.161 -> 69688 23:43:41.206 -> Arduino woke up! 23:43:41.206 -> Arduino woke up! 23:43:41.206 -> Arduino woke up! 23:43:41.206 -> Working 23:43:41.206 -> Rfid134_Error_None 23:43:41.206 -> Rfid134_Error_PacketEndCodeMissmatch 23:43:41.206 -> Rfid1�&��Error_PacketChe����um 23:43:42.920 -> Rfid134_Err�K}�PacketChecksumI�˕�rt 23:43:42.920 -> 17
Code:
Beta Was this translation helpful? Give feedback.
All reactions