KIR Misc Functions.ino: Difference between revisions

From AnalysIR WiKi
Jump to navigation Jump to search
Line 15: Line 15:
== initPins ==
== initPins ==


This function sets the pinMOde for the non row/col pins and sets their HIGH/LOW level ar appropriate. This essentials covers the 2 IR receivers, The Ir emitter, the 2 I2C pins and the GPIO power supply pins for the optional IR receivers and I2C EEPROM (Both of which are powered off by default.
This function sets the pinMOde for the non row/col pins and sets their HIGH/LOW level as appropriate. This essentialy covers the 2 IR receivers, The IR emitter, the 2 I2C pins and the GPIO power supply pins for the optional IR receivers and I2C EEPROM ''(Both of which are powered off by default)''.


== initLowPowerSleep ==
== initLowPowerSleep ==

Revision as of 13:17, 24 October 2019

> KontroLIR Home


These miscelaneous functions cover:

  • Low Power Operation
  • Low power sleep mode
  • Setting MCU oscillator frequency
  • Supply voltage measurement
  • Reading average supply votage from ADC
  • Printing out ATmega328PB fuse settings and lockbits, in debug mode.

initPins

This function sets the pinMOde for the non row/col pins and sets their HIGH/LOW level as appropriate. This essentialy covers the 2 IR receivers, The IR emitter, the 2 I2C pins and the GPIO power supply pins for the optional IR receivers and I2C EEPROM (Both of which are powered off by default).

initLowPowerSleep

goToSleep

initF_CPU

checkBattery

checkLowBattery

readAvgVCC

printFuses

> KontroLIR Home