Step 8Add two buttons and load final code
In the final code downloadable here, I stored the value of two tags worn by the our animals, one with and one without access. When the animal without access tries to get in, the door is locked immediately.
byte goodcode[6] = {0x1C, 0, 0xFC, 0xB2, 0x90};
byte badcode[6] = {0x16, 0, 0x78, 0xE7, 0xFE};
You have to find the code of the tags you are using and put those values into the arrays 'goodcode' and 'badcode'. The values are hexadecimal which need '0x' in front of it in this programming language.
If you don't want to tag the other cat, shortening the open time (smaller value for variable 'open_time') can help, although that puts the burden on the cat with access to respond faster.
It is a good idea to put an enclosure around the electronics, but that will not be discussed in this instructable.
On a final note, if your antenna has a large range extending into the secured area, you may need to calibrate the positioning of the antenna and the proximity sensor a bit to make sure the RFreader is not activated from the inside. If the cat is inside and wants to go out, the proximity sensor has to detect the cat first. Once that happens, it is okay because in that part of the program, the RF reader is not checked.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|














































