I did a presentation earlier in the year about hardware prototyping. These are my notes from gathering information from experience and various sources online. On a side note, I can't believe i have not found out about the photon before. Amazing device that makes hardware prototyping a lot easier.
only digital pins
ADC and DAC: http://www.hardwaresecrets.com/how-analog-to-digital-converter-adc-works/
Can do analog out/in through external modules: https://learn.adafruit.com/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi/overviewRead More
Instead of changing each and every link and adding my own custom handlers, I decided to override the onclick event in the body. Whenever the user clicks anywhere on the page, my custom onclick handler will receive the event and handles it accordingly.
It first checks to see if it is inside an <a> tag, if it is then we are pretty much done since we found the link. If it isnt, it continues to check the parent tag until it reaches the body. This handles cases where you have an <img> tag inside an <a> tag. So when the user clicks on the image, the onclick event will be received on the image and not the <a> tag. So we have to traverse upwards.