This is the GCB code for the WL102 transmitter. I managed to put it into sleep mode and use the PIR sensor to send an alarm. I looked for an example but couldn't find it. I couldn't put it into deep sleep mode with Arduino... but I did manage to do it with GCB. I hope this helps. If you're interested, I have the receiver part for the WL101, but it's written for Arduino Nano.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for my English, but I noticed a mistake in the diagram: the PIR is powered by 5 volts, but it needs to be powered by 3 volts due to communication levels. JP1 is not used at the moment. Sorry again.
I modified the PIR sensor to operate at 3 volts. Simply remove the stabilizer and jumper as shown in the photo. The modifications are attached.
Be careful not to reverse the polarity of the circuit because it has no protection.
The receiver stopped working after a while, the cause is that when it receives characters that are not the right string, these characters are added to the array and it seems to overflow.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd like to post my working example of a WL102 module sending a string using a PIR sensor and an Attiny85.
I look forward to your reply. Thank you.
Sounds a great solution. Do share and l will include in the Demonstrations!
This is the GCB code for the WL102 transmitter. I managed to put it into sleep mode and use the PIR sensor to send an alarm. I looked for an example but couldn't find it. I couldn't put it into deep sleep mode with Arduino... but I did manage to do it with GCB. I hope this helps. If you're interested, I have the receiver part for the WL101, but it's written for Arduino Nano.
Lo schematic
Thank you. I have taken your code and hopefully I have helped by documenting the program.
Please have a look thru and hopefully these are documentation changes only, and, focused on the use of English.
If this ok. Then, I will put into GitHub.
Post the receiver part for the WL101. We should publish the completed solution.
Evan
Sorry for my English, but I noticed a mistake in the diagram: the PIR is powered by 5 volts, but it needs to be powered by 3 volts due to communication levels. JP1 is not used at the moment. Sorry again.
Here is your project https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/PIR_Solutions/WL102_PIR_Sensor
This will get put into the demos next time we do a build.
Any changes - just let me know via this thread.
I change the voltage in the diagram. Any more changes?
Evan
I modified the PIR sensor to operate at 3 volts. Simply remove the stabilizer and jumper as shown in the photo. The modifications are attached.
Be careful not to reverse the polarity of the circuit because it has no protection.
I'm also adding this for clarity.
Check out the updated folder on GitHub. Hopefully, looks ok.
Here is your project https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/PIR_Solutions/WL102_PIR_Sensor
I made a mistake posting the post here; see the post on ask-ook tx rx
Last edit: Romtek 2025-09-08
TX
I am confued. Do I replace the GCB source in https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/PIR_Solutions/WL102_PIR_Sensor
The GCB source looks very different to the one posted today.
Help me to resolve.
RX
The receiver stopped working after a while, the cause is that when it receives characters that are not the right string, these characters are added to the array and it seems to overflow.
Thanks.
But, the GCB source looks very different in https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/PIR_Solutions/WL102_PIR_Sensor Is that the transmit code? and, I did not put the receive code there before?
Or, do I delete the existing GCB in https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/PIR_Solutions/WL102_PIR_Sensor and replace with code above?
This is why I am confused. Look at https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/PIR_Solutions/WL102_PIR_Sensor and help me resolve.
I made a mistake this is the code for the ask-ook receiver ..sorry.