-->
Page 1 of 1

Help Pleas nodemcu + MySQL + Relai + rfid

PostPosted: Sun Dec 02, 2018 9:59 pm
by Nichtwitzig228
Hi guys,

I have a small problem and hope to finally find an answer in this forum. In fact:
I want it to work in the end so I have a Nodemcu esp8266 and connected to a rfid reader and a relai. The nodemcu is then connected to my local server and as soon as I hold a chip (rfid chip, card, other) to the rfid reader, it should query via php script on my MySQL database, if the value "Allow" at the appropriate chip id is set to 1 or 0 (the value Allow stands for whether or not the relay can be turned on). And depending on whether the value is 1 or 0, the relai goes on or off (1 = on, 0 = off). I want to fix it then so that the relai stays on for a certain time and then goes out by itself again. The value with the 1 and the 0 over which I just wrote should not describe the value of the relay but how often you can still make the Relai on. So for example:
0 = Relai does not work
1 = relay goes on (value = -1)
2 = relay goes on (value = -1)
etc…
In any case, I know myself well with php and MySQL, but not so with the arduino ide and the nodemcu and therefore appeal to all good technicians in this forum that can help me kindly. Also, my knowledge does not go that far because I'm only 13 years old. I am thankful for every help.
insofar

Thank you in advance

Max

Re: Help Pleas nodemcu + MySQL + Relai + rfid

PostPosted: Mon Dec 03, 2018 5:51 am
by schufti
without showing what effort you allready have done to reach your goal, there won't be much to expect from members. They won't write your code.
So I suggest to first start on the part where you control the relay. The boardsearch will show you several threads to this topic.
Followed by reading the serial from the RFID, there are examples coming with the RFID libraries.
Finally the most complex part: connecting to your database and get a result for a query.
If you have a specific question to one of your milestones, don't hesitate to come back and ask again.
You will also find some help in german over @ http://www.mikrocontroller.net