November 28, 2024, 03:53:07 AM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


HC-8 and Parallax RFID reader

Started by gadget-evilusions, November 06, 2015, 06:28:39 PM

Previous topic - Next topic

gadget-evilusions

I would like to interface the https://www.parallax.com/product/32390 and an HC-8.

What I would like to do:

Upon start up all outputs are off.

Wait for RFID tag 1 to be seen. When RFID tag is seen it enables the program to start watching for sensor 1.

When Sensor 1 is activated, output 1 is set to on.

The program now waits for RFID tag 2 to be seen. When it is, output 1 is set to off.

The program now waits for RFID tag 2 and the process repeats.

Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

livinlowe

Quote from: gadget-evilusions on November 06, 2015, 06:28:39 PM
I would like to interface the https://www.parallax.com/product/32390 and an HC-8.

What I would like to do:

Upon start up all outputs are off.

Wait for RFID tag 1 to be seen. When RFID tag is seen it enables the program to start watching for sensor 1.

When Sensor 1 is activated, output 1 is set to on.

The program now waits for RFID tag 2 to be seen. When it is, output 1 is set to off.

The program now waits for RFID tag 2 and the process repeats.
"The program now waits for RFID tag 2 and the process repeats." Do you mean RFID 1?
Shawn
Scaring someone with a prop you built -- priceless!

JonnyMac

November 07, 2015, 11:33:16 AM #2 Last Edit: November 07, 2015, 01:54:09 PM by JonnyMac
Is the SERIAL input on the HC-8+ available? The RFID reader is a 5V device.

Can the outputs tags be presented out of order?

I believe in a building blocks approach to programming. Attached you'll find a simple RFID tag scanner that will read and display tags. It uses the SERIAL connections (you have to enable 5V on SERIAL header by adding solder-blob on the bottom of the board). The reader /ENABLE pin is connected to ground which makes it active all the time. You see that I put a delay in the code with a call the the rfid.clear() method to prevent multiple reads from the same tag.
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

Okay, here's a version of the program that works in sequential mode.

Issues:
-- I had no idea what to call this program
-- I had no idea what to do when all tags/sensors were activated.

I only have two RFID tags to test with; it does work.
Jon McPhalen
EFX-TEK Hollywood Office