I already wrote my first Arduino program. It’s really simple but fun :)
What it does is that every time somebody visits my website, a LED light blinks once in my room, and I get a warm feeling of a visitor ;)
How to do that:
- Burn this code to your Arduino:
- Connect a LED light to pin 12 and ground it.
- Connect your Arduino to your web server through USB.
- Log in to your web server and type: “sudo chmod 666 /dev/ttyUSB0”.
- Add this PHP code to your website header:
- Enjoy! :)
In case this doesn’t work; try to solve your problem or comment this article and I will try to help you.