The Code

To write the code, we first required the code which is needed to use the mpr121 breakout board. We got the code from this website:

http://bildr.org/2011/05/mpr121_arduino/

We then changed the code around so that it can incorporate our use of LEDs, the button and the shocker that we made. To see the changes to the code, visit this gitlab link:

The changes we made were done in the mpr121.ino file given to us through the bildr website. The red rows were our deletions and the green rows were what we added to the code to make it work how we wanted.

http://gitlab.doc.gold.ac.uk/uyunu001/Arduino-Shock-Vest/commit/f7cb1d93074f36a1c4eaacf914140ac34df6c2cc

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s