
There are thousands of libraries out there! And luckily it’s pretty easy to install them.

Libraries make complex tasks easier so that we can focus on larger projects. The m圜apPad.capacitiveSensor() takes care of all the heavy lifting and the senseReading variable contains the value sensed from our capacitive pad. SenseReading = m圜apPad.capacitiveSensor(30) While ( (*rIn & rBit) & (total = CS_Timeout_Millis)Īll that code can be replaced with a much easier to use and understand statement such as: language:c *rReg |= rBit // set pin to OUTPUT - pin is now HIGH AND OUTPUT *rOut |= rBit // set receive pin HIGH - turns on pullup set receive pin HIGH briefly to charge up fully While ( !(*rIn & rBit) & (total CS_Timeout_Millis) *rReg |= rBit // set pin to OUTPUT - pin is now LOW AND OUTPUT *rOut &= ~rBit // set receivePin Register low to make sure pullups are off *rReg &= ~rBit // set receivePin to input *sOut &= ~sBit // set Send Pin Register low The CapacitiveSensor library takes care of everything so that we don’t have to write code like this: language:c We can write the code from scratch, or we can stand on the shoulders of great people who are smarter than we are.Ĭapacitive touch sensing is a very popular interface. For example, capacitive sensing takes difficult timing and pulsing of digital pins. Arduino users have written lots of exciting add-ons for Arduino. RTC.adjust(DateTime(_DATE_, _TIME_)) Ĥ.Upload the code,then open the serial monitor to see the current time.Arduino libraries take a complex task and boil it down to simple to use functions. following line sets the RTC to the date & time this sketch was compiled \arduino-1.0\libraries.ģ.Open the code directly by the path:File -> Example ->RTC. Arduino has one I2C port with A4 and A5, connect the RTC module to Arduino as below:Ģ.Unzip it into the libraries file of Arduino IDE by the path. The RTC module use the I2C bus to communicate with Arduino&Crowduinom. 56-Byte, Battery-Backed, Nonvolatile (NV)RAM for data storage.Consumes less than 500nA in Battery-Backup Mode with Oscillator Running.Automatic Power-Fail detect and switch circuitry.The clock operates in either the 24-hour or 12-hour format with AM/PM indicator.



The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock/calendar provides seconds, minutes, hours, day, date,month, and year information. This tiny RTC module is based on the clock chip DS1307 which supports the I2C protocol.
