Qwiic_RV-8803_Py  2.0.0-1-gad89d9f
Python for SFE Qwiic RV-8803
Loading...
Searching...
No Matches
qwiic_rv8803.QwiicRV8803 Class Reference
Inheritance diagram for qwiic_rv8803.QwiicRV8803:

Public Member Functions

def __init__ (self, address=None, i2c_driver=None)
 Constructor. More...
 
def is_connected (self)
 Determines if this device is connected. More...
 
def begin (self)
 Initializes this device with default parameters. More...
 
def set_12_hour (self)
 Sets the device to 12 hour mode. More...
 
def set_24_hour (self)
 Sets the device to 24 hour mode. More...
 
def is_12_hour (self)
 Determines if the device is in 12 hour mode. More...
 
def is_PM (self)
 Determines if the device is in PM. More...
 
def string_date_usa (self)
 Returns the date in MM/DD/YYYY format. More...
 
def string_date (self)
 Returns the date in the DD/MM/YYYY format. More...
 
def string_time (self)
 Returns the time in hh:mm:ss (Adds AM/PM if in 12 hour mode) More...
 
def string_timestamp (self)
 Returns the most recent timestamp captured on the EVI pin (if the EVI pin has been configured to capture events) More...
 
def string_time_8601 (self)
 Returns timestamp in ISO 8601 format (yyyy-mm-ddThh:mm:ss) More...
 
def string_time_8601_TZ (self)
 Returns timestamp in ISO 8601 format (yyyy-mm-ddThh:mm:ss) and uses timezone corrections. More...
 
def string_day_of_week (self)
 Returns the day of the week as a string. More...
 
def string_day_of_week_short (self)
 Return the day of week. More...
 
def string_date_ordinal (self)
 Return the ordinal for the date (day of month). More...
 
def string_month (self)
 Return the name of the month. More...
 
def string_month_short (self)
 Return the name of the month (short). More...
 
def set_time_list (self, time_list)
 Sets the time using a list of bytes. More...
 
def set_time (self, seconds, minutes, hours, weekday, date, month, year)
 Sets the time using individual values. More...
 
def set_epoch (self, value, use1970sEpoch=True, timeZoneQuarterHours=0)
 Sets time using UNIX Epoch time. More...
 
def set_local_epoch (self, value, use1970sEpoch=True)
 Set the local epoch - without adding the time zone. More...
 
def set_hundredths_to_zero (self)
 Sets the hundredths value to zero by setting then clearing RESET bit in CONTROL register (see App-Manual page 43) More...
 
def set_seconds (self, value)
 Sets the seconds value. More...
 
def set_minutes (self, value)
 Sets the minutes value. More...
 
def set_hours (self, value)
 Sets the hours value. More...
 
def set_date (self, value)
 Sets the date value. More...
 
def set_weekday (self, value)
 Sets the weekday value. More...
 
def set_month (self, value)
 Sets the month value. More...
 
def set_year (self, value)
 Sets the year value. More...
 
def set_time_zone_quarter_hours (self, quarter_hours)
 Sets the time zone in quarter hours. More...
 
def get_time_zone_quarter_hours (self)
 Gets the time zone in quarter hours. More...
 
def update_time (self)
 Updates the time by reading the time from the RTC and storing it in the time list. More...
 
def get_hundredths (self)
 Gets the byte value for hundredths. More...
 
def get_seconds (self)
 Gets the byte value for seconds. More...
 
def get_minutes (self)
 Gets the byte value for minutes. More...
 
def get_hours (self)
 Gets the byte value for hours, automatically converts to 12 hour mode if necessary. More...
 
def get_date (self)
 Gets the byte value for date. More...
 
def get_weekday (self)
 Gets the byte value for weekday. More...
 
def get_month (self)
 Gets the byte value for month. More...
 
def get_year (self)
 Gets the byte value for year. More...
 
def get_epoch (self, use1970sEpoch=True)
 Get the epoch - with the time zone subtracted (i.e. More...
 
def get_local_epoch (self, use1970sEpoch=True)
 Get the local epoch - without subtracting the time zone. More...
 
def get_hundredths_capture (self)
 Gets the byte value for hundredths capture. More...
 
def get_seconds_capture (self)
 Gets the byte value for seconds capture. More...
 
def set_calibration_offset (self, ppm)
 Sets the calibration offset in parts per million (ppm) More...
 
def get_calibration_offset (self)
 Gets the calibration offset in parts per million. More...
 
def set_evi_debounce_time (self, debounce_time)
 Sets the EVI debounce time. More...
 
def set_evi_calibration (self, evi_calibration)
 Sets the EVI calibration. More...
 
def set_evi_edge_detection (self, edge)
 Sets the EVI edge detection. More...
 
def set_evi_event_capture (self, capture)
 Sets the EVI event capture. More...
 
def get_evi_debounce_time (self)
 Gets the EVI debounce time. More...
 
def get_evi_calibration (self)
 Gets the EVI calibration. More...
 
def get_evi_edge_detection (self)
 Gets the EVI edge detection. More...
 
def get_evi_event_capture (self)
 Gets the EVI event capture. More...
 
def set_countdown_timer_enable (self, timer_state)
 Sets the countdown timer enable. More...
 
def set_countdown_timer_frequency (self, countdown_timer_frequency)
 Sets the countdown timer frequency. More...
 
def set_countdown_timer_clock_ticks (self, clock_ticks)
 Sets the countdown timer clock ticks. More...
 
def get_countdown_timer_clock_ticks (self)
 Gets the countdown timer clock ticks. More...
 
def set_clock_out_timer_frequency (self, clock_out_timer_frequency)
 Sets the clock out timer frequency. More...
 
def get_countdown_timer_enable (self)
 Gets the countdown timer enable. More...
 
def get_countdown_timer_frequency (self)
 Gets the countdown timer frequency. More...
 
def get_clock_out_timer_frequency (self)
 Gets the clock out timer frequency. More...
 
def set_periodic_time_update_frequency (self, time_update_frequency)
 Sets the periodic time update frequency. More...
 
def get_periodic_time_update_frequency (self)
 Gets the periodic time update frequency. More...
 
def set_items_to_match_for_alarm (self, minuteAlarm, hourAlarm, weekdayAlarm, dateAlarm)
 Set Alarm Mode controls which parts of the time have to match for the alarm to trigger. More...
 
def set_alarm_minutes (self, minute)
 Sets the alarm minutes. More...
 
def set_alarm_hours (self, hour)
 Sets the alarm hours. More...
 
def set_alarm_weekday (self, weekday)
 Sets the alarm weekday. More...
 
def set_alarm_date (self, date)
 Sets the alarm date. More...
 
def enable_hardware_interrupt (self, source)
 Enables the hardware interrupt for the given source. More...
 
def disable_hardware_interrupt (self, source)
 Disables the hardware interrupt for the given source Allowable sources: kUpdateInterrupt kTimerInterrupt kAlarmInterrupt kEviInterrupt kControlReset. More...
 
def disable_all_interrupts (self)
 Disables all hardware interrupts. More...
 
def get_interrupt_flag (self, flag_to_get)
 Gets the interrupt flag for the given source. More...
 
def clear_all_interrupt_flags (self)
 Clears all interrupt flags. More...
 
def clear_interrupt_flag (self, flag_to_clear)
 Clears the interrupt flag for the given source. More...
 
def get_alarm_minutes (self)
 Gets the alarm minutes. More...
 
def get_alarm_hours (self)
 Gets the alarm hours. More...
 
def get_alarm_weekday (self)
 Gets the alarm weekday. More...
 
def get_alarm_date (self)
 Gets the alarm date. More...
 
def dec_to_bcd (self, val)
 Converts decimal to binary coded decimal. More...
 
def bcd_to_dec (self, val)
 Converts binary coded decimal to decimal. More...
 
def write_bit (self, reg, bit, val)
 Writes a bit to a register. More...
 
def write_two_bits (self, reg, bit, val)
 Writes two bits to a register. More...
 
def read_bit (self, reg, bit)
 Reads a bit from a register. More...
 
def read_two_bits (self, reg, bit)
 Reads two bits from a register. More...
 

Public Attributes

 address
 

Static Public Attributes

 device_name = _DEFAULT_NAME
 
 available_addresses = _AVAILABLE_I2C_ADDRESS
 
int kSunday = 0x01
 
int kMonday = 0x02
 
int kTuesday = 0x04
 
int kWednesday = 0x08
 
int kThursday = 0x10
 
int kFriday = 0x20
 
int kSaturday = 0x40
 
int kRegRAM = 0x07
 
int kRegHundredths = 0x10
 
int kRegSeconds = 0x11
 
int kRegMinutes = 0x12
 
int kRegHours = 0x13
 
int kRegWeekdays = 0x14
 
int kRegDate = 0x15
 
int kRegMonths = 0x16
 
int kRegYears = 0x17
 
int kRegMinutesAlarm = 0x18
 
int kRegHoursAlarm = 0x19
 
int kRegWeekdaysDateAlarm = 0x1A
 
int kRegTimer0 = 0x1B
 
int kRegTimer1 = 0x1C
 
int kRegExtension = 0x1D
 
int kRegFlag = 0x1E
 
int kRegControl = 0x1F
 
int kRegHundredthsCapture = 0x20
 
int kRegSecondsCapture = 0x21
 
int kRegOffset = 0x2C
 
int kRegEventControl = 0x2F
 
int kAlarmEnable = 7
 
int kExtensionTest = 7
 
int kExtensionWada = 6
 
int kExtensionUsel = 5
 
int kExtensionTe = 4
 
int kExtensionFd = 2
 
int kExtensionTd = 0
 
int kFlagUpdate = 5
 
int kFlagTimer = 4
 
int kFlagAlarm = 3
 
int kFlagEvi = 2
 
int kFlagV2f = 1
 
int kFlagV1f = 0
 
int kUpdateInterrupt = 5
 
int kTimerInterrupt = 4
 
int kAlarmInterrupt = 3
 
int kEviInterrupt = 2
 
int kControlReset = 0
 
int kEventEcp = 7
 
int kEventEhl = 6
 
int kEventEt = 4
 
int kEventErst = 0
 
int kCountdownTimerFrequency4096Hz = 0b00
 
int kCountdownTimerFrequency64Hz = 0b01
 
int kCountdownTimerFrequency1Hz = 0b10
 
int kCountdownTimerFrequency1_60thHz = 0b11
 
int kClockOutFrequency32768Hz = 0b00
 
int kClockOutFrequency1024Hz = 0b01
 
int kClockOutFrequency1Hz = 0b10
 
bool kCountdownTimerOn = True
 
bool kCountdownTimerOff = False
 
bool kTimeUpdate1Second = False
 
bool kTimeUpdate1Minute = True
 
bool kEnableEviCalibration = True
 
bool kDisableEviCalibration = False
 
int kEviDebounceNone = 0b00
 
int kEviDebounce256Hz = 0b01
 
int kEviDebounce64Hz = 0b10
 
int kEviDebounce8Hz = 0b11
 
bool kRisingEdge = True
 
bool kFallingEdge = False
 
bool kEviCaptureEnable = True
 
bool kEviCaptureDisable = False
 
int kTimeListLength = 8
 
int kIdxHundredths = 0
 
int kIdxSeconds = 1
 
int kIdxMinutes = 2
 
int kIdxHours = 3
 
int kIdxWeekday = 4
 
int kIdxDate = 5
 
int kIdxMonth = 6
 
int kIdxYear = 7
 
int kTmYear = 0
 
int kTmMonth = 1
 
int kTmMDay = 2
 
int kTmHour = 3
 
int kTmMinute = 4
 
int kTmSecond = 5
 
int kTmWDay = 6
 
int kTmYDay = 7
 
int kTmIsDST = 8
 

Properties

 connected = property(is_connected)
 

Constructor & Destructor Documentation

◆ __init__()

def qwiic_rv8803.QwiicRV8803.__init__ (   self,
  address = None,
  i2c_driver = None 
)

Constructor.

Parameters
int,optionaladdress: The I2C address to use for the device If not provided, the default address is used
I2CDriver,optionali2c_driver: An existing i2c driver object If not provided, a driver object is created

Member Function Documentation

◆ bcd_to_dec()

def qwiic_rv8803.QwiicRV8803.bcd_to_dec (   self,
  val 
)

Converts binary coded decimal to decimal.

Parameters
valThe binary coded decimal value to convert
Returns
int The decimal value

◆ begin()

def qwiic_rv8803.QwiicRV8803.begin (   self)

Initializes this device with default parameters.

Returns
bool Returns True if successful, otherwise False

◆ clear_all_interrupt_flags()

def qwiic_rv8803.QwiicRV8803.clear_all_interrupt_flags (   self)

Clears all interrupt flags.

◆ clear_interrupt_flag()

def qwiic_rv8803.QwiicRV8803.clear_interrupt_flag (   self,
  flag_to_clear 
)

Clears the interrupt flag for the given source.

Parameters
intflag_to_clear: The interrupt flag to clear

◆ dec_to_bcd()

def qwiic_rv8803.QwiicRV8803.dec_to_bcd (   self,
  val 
)

Converts decimal to binary coded decimal.

Parameters
valThe decimal value to convert
Returns
int The binary coded decimal

◆ disable_all_interrupts()

def qwiic_rv8803.QwiicRV8803.disable_all_interrupts (   self)

Disables all hardware interrupts.

◆ disable_hardware_interrupt()

def qwiic_rv8803.QwiicRV8803.disable_hardware_interrupt (   self,
  source 
)

Disables the hardware interrupt for the given source Allowable sources: kUpdateInterrupt kTimerInterrupt kAlarmInterrupt kEviInterrupt kControlReset.

Parameters
intsource: The interrupt source

◆ enable_hardware_interrupt()

def qwiic_rv8803.QwiicRV8803.enable_hardware_interrupt (   self,
  source 
)

Enables the hardware interrupt for the given source.

Given a bit location, enable the interrupt Allowable sources: kUpdateInterrupt kTimerInterrupt kAlarmInterrupt kEviInterrupt kControlReset

Parameters
intsource: The interrupt source

◆ get_alarm_date()

def qwiic_rv8803.QwiicRV8803.get_alarm_date (   self)

Gets the alarm date.

Returns
int The alarm date

◆ get_alarm_hours()

def qwiic_rv8803.QwiicRV8803.get_alarm_hours (   self)

Gets the alarm hours.

Returns
int The alarm hours

◆ get_alarm_minutes()

def qwiic_rv8803.QwiicRV8803.get_alarm_minutes (   self)

Gets the alarm minutes.

Returns
int The alarm minutes

◆ get_alarm_weekday()

def qwiic_rv8803.QwiicRV8803.get_alarm_weekday (   self)

Gets the alarm weekday.

Returns
int The alarm weekday

◆ get_calibration_offset()

def qwiic_rv8803.QwiicRV8803.get_calibration_offset (   self)

Gets the calibration offset in parts per million.

Returns
int The calibration offset in parts per million

◆ get_clock_out_timer_frequency()

def qwiic_rv8803.QwiicRV8803.get_clock_out_timer_frequency (   self)

Gets the clock out timer frequency.

Returns
int The clock out timer frequency

◆ get_countdown_timer_clock_ticks()

def qwiic_rv8803.QwiicRV8803.get_countdown_timer_clock_ticks (   self)

Gets the countdown timer clock ticks.

Returns
int The countdown timer clock ticks

◆ get_countdown_timer_enable()

def qwiic_rv8803.QwiicRV8803.get_countdown_timer_enable (   self)

Gets the countdown timer enable.

Returns
bool The countdown timer enable

◆ get_countdown_timer_frequency()

def qwiic_rv8803.QwiicRV8803.get_countdown_timer_frequency (   self)

Gets the countdown timer frequency.

Returns
int The countdown timer frequency

◆ get_date()

def qwiic_rv8803.QwiicRV8803.get_date (   self)

Gets the byte value for date.

Returns
int The date

◆ get_epoch()

def qwiic_rv8803.QwiicRV8803.get_epoch (   self,
  use1970sEpoch = True 
)

Get the epoch - with the time zone subtracted (i.e.

return UTC epoch)

Parameters
booluse1970sEpoch: If True, the epoch is in the 1970s
Returns
int The epoch time

◆ get_evi_calibration()

def qwiic_rv8803.QwiicRV8803.get_evi_calibration (   self)

Gets the EVI calibration.

Returns
bool The EVI calibration

◆ get_evi_debounce_time()

def qwiic_rv8803.QwiicRV8803.get_evi_debounce_time (   self)

Gets the EVI debounce time.

Returns
int The debounce time

◆ get_evi_edge_detection()

def qwiic_rv8803.QwiicRV8803.get_evi_edge_detection (   self)

Gets the EVI edge detection.

Returns
bool The edge detection

◆ get_evi_event_capture()

def qwiic_rv8803.QwiicRV8803.get_evi_event_capture (   self)

Gets the EVI event capture.

Returns
bool The event capture

◆ get_hours()

def qwiic_rv8803.QwiicRV8803.get_hours (   self)

Gets the byte value for hours, automatically converts to 12 hour mode if necessary.

Returns
int The hours

◆ get_hundredths()

def qwiic_rv8803.QwiicRV8803.get_hundredths (   self)

Gets the byte value for hundredths.

Returns
int The hundredths

◆ get_hundredths_capture()

def qwiic_rv8803.QwiicRV8803.get_hundredths_capture (   self)

Gets the byte value for hundredths capture.

Returns
int The hundredths capture

◆ get_interrupt_flag()

def qwiic_rv8803.QwiicRV8803.get_interrupt_flag (   self,
  flag_to_get 
)

Gets the interrupt flag for the given source.

Parameters
intflag_to_get: The interrupt flag to get
Returns
bool The value of the interrupt flag

◆ get_local_epoch()

def qwiic_rv8803.QwiicRV8803.get_local_epoch (   self,
  use1970sEpoch = True 
)

Get the local epoch - without subtracting the time zone.

Parameters
booluse1970sEpoch: If True, the epoch is in the 1970s
Returns
int The epoch time

◆ get_minutes()

def qwiic_rv8803.QwiicRV8803.get_minutes (   self)

Gets the byte value for minutes.

Returns
int The minutes

◆ get_month()

def qwiic_rv8803.QwiicRV8803.get_month (   self)

Gets the byte value for month.

Returns
int The month

◆ get_periodic_time_update_frequency()

def qwiic_rv8803.QwiicRV8803.get_periodic_time_update_frequency (   self)

Gets the periodic time update frequency.

Returns
bool The periodic time update frequency

◆ get_seconds()

def qwiic_rv8803.QwiicRV8803.get_seconds (   self)

Gets the byte value for seconds.

Returns
int The seconds

◆ get_seconds_capture()

def qwiic_rv8803.QwiicRV8803.get_seconds_capture (   self)

Gets the byte value for seconds capture.

Returns
int The seconds capture

◆ get_time_zone_quarter_hours()

def qwiic_rv8803.QwiicRV8803.get_time_zone_quarter_hours (   self)

Gets the time zone in quarter hours.

Returns
int The time zone offset in 15 minute increments

◆ get_weekday()

def qwiic_rv8803.QwiicRV8803.get_weekday (   self)

Gets the byte value for weekday.

Compare against the day constants inherent to this class.

Returns
int The weekday

◆ get_year()

def qwiic_rv8803.QwiicRV8803.get_year (   self)

Gets the byte value for year.

Automatically adds 2000 to the year.

Returns
int The year

◆ is_12_hour()

def qwiic_rv8803.QwiicRV8803.is_12_hour (   self)

Determines if the device is in 12 hour mode.

Returns
bool True if in 12 hour mode, otherwise False

◆ is_connected()

def qwiic_rv8803.QwiicRV8803.is_connected (   self)

Determines if this device is connected.

Returns
bool True if connected, otherwise False

◆ is_PM()

def qwiic_rv8803.QwiicRV8803.is_PM (   self)

Determines if the device is in PM.

Returns
bool Returns true if the microcontroller is in 12 hour mode and the RTC has an hours value greater than or equal to 12 (Noon).

◆ read_bit()

def qwiic_rv8803.QwiicRV8803.read_bit (   self,
  reg,
  bit 
)

Reads a bit from a register.

Parameters
intreg: The register to read from
intbit: The bit to read
Returns
bool The value of the bit

◆ read_two_bits()

def qwiic_rv8803.QwiicRV8803.read_two_bits (   self,
  reg,
  bit 
)

Reads two bits from a register.

Parameters
intreg: The register to read from
intbit: The bit to read
Returns
int The value of the bits

◆ set_12_hour()

def qwiic_rv8803.QwiicRV8803.set_12_hour (   self)

Sets the device to 12 hour mode.

◆ set_24_hour()

def qwiic_rv8803.QwiicRV8803.set_24_hour (   self)

Sets the device to 24 hour mode.

◆ set_alarm_date()

def qwiic_rv8803.QwiicRV8803.set_alarm_date (   self,
  date 
)

Sets the alarm date.

Parameters
intdate: The date value

◆ set_alarm_hours()

def qwiic_rv8803.QwiicRV8803.set_alarm_hours (   self,
  hour 
)

Sets the alarm hours.

Parameters
inthour: The hour value

◆ set_alarm_minutes()

def qwiic_rv8803.QwiicRV8803.set_alarm_minutes (   self,
  minute 
)

Sets the alarm minutes.

Parameters
intminute: The minute value

◆ set_alarm_weekday()

def qwiic_rv8803.QwiicRV8803.set_alarm_weekday (   self,
  weekday 
)

Sets the alarm weekday.

Parameters
intweekday: The weekday value

◆ set_calibration_offset()

def qwiic_rv8803.QwiicRV8803.set_calibration_offset (   self,
  ppm 
)

Sets the calibration offset in parts per million (ppm)

Under the hood, the offset is a two's complement value with a range of -32 to + 31. See App-Manual page 22 for more information.

Parameters
floatppm: The calibration offset in parts per million

◆ set_clock_out_timer_frequency()

def qwiic_rv8803.QwiicRV8803.set_clock_out_timer_frequency (   self,
  clock_out_timer_frequency 
)

Sets the clock out timer frequency.

Parameters
intclock_out_timer_frequency: The clock out timer frequency

◆ set_countdown_timer_clock_ticks()

def qwiic_rv8803.QwiicRV8803.set_countdown_timer_clock_ticks (   self,
  clock_ticks 
)

Sets the countdown timer clock ticks.

Parameters
intclock_ticks: The clock ticks

◆ set_countdown_timer_enable()

def qwiic_rv8803.QwiicRV8803.set_countdown_timer_enable (   self,
  timer_state 
)

Sets the countdown timer enable.

Parameters
booltimer_state: The timer state

◆ set_countdown_timer_frequency()

def qwiic_rv8803.QwiicRV8803.set_countdown_timer_frequency (   self,
  countdown_timer_frequency 
)

Sets the countdown timer frequency.

Parameters
intcountdown_timer_frequency: The countdown timer frequency

◆ set_date()

def qwiic_rv8803.QwiicRV8803.set_date (   self,
  value 
)

Sets the date value.

Parameters
intvalue: The date value
Returns
bool True if successful, otherwise False

◆ set_epoch()

def qwiic_rv8803.QwiicRV8803.set_epoch (   self,
  value,
  use1970sEpoch = True,
  timeZoneQuarterHours = 0 
)

Sets time using UNIX Epoch time.

If timeZoneQuarterHours is non-zero, update RV8803_RAM. Add the zone to the epoch before setting

Parameters
intvalue: The epoch time
booluse1970sEpoch: If True, the epoch is in the 1970s
inttimeZoneQuarterHours: The time zone offset in 15 minute increments

◆ set_evi_calibration()

def qwiic_rv8803.QwiicRV8803.set_evi_calibration (   self,
  evi_calibration 
)

Sets the EVI calibration.

Parameters
boolevi_calibration: The EVI calibration

◆ set_evi_debounce_time()

def qwiic_rv8803.QwiicRV8803.set_evi_debounce_time (   self,
  debounce_time 
)

Sets the EVI debounce time.

Parameters
intdebounce_time: The debounce time

◆ set_evi_edge_detection()

def qwiic_rv8803.QwiicRV8803.set_evi_edge_detection (   self,
  edge 
)

Sets the EVI edge detection.

Parameters
booledge: The edge detection

◆ set_evi_event_capture()

def qwiic_rv8803.QwiicRV8803.set_evi_event_capture (   self,
  capture 
)

Sets the EVI event capture.

Parameters
boolcapture: The event capture

◆ set_hours()

def qwiic_rv8803.QwiicRV8803.set_hours (   self,
  value 
)

Sets the hours value.

Parameters
intvalue: The hours value
Returns
bool True if successful, otherwise False

◆ set_hundredths_to_zero()

def qwiic_rv8803.QwiicRV8803.set_hundredths_to_zero (   self)

Sets the hundredths value to zero by setting then clearing RESET bit in CONTROL register (see App-Manual page 43)

◆ set_items_to_match_for_alarm()

def qwiic_rv8803.QwiicRV8803.set_items_to_match_for_alarm (   self,
  minuteAlarm,
  hourAlarm,
  weekdayAlarm,
  dateAlarm 
)

Set Alarm Mode controls which parts of the time have to match for the alarm to trigger.

When the RTC matches a given time, make an interrupt fire. Setting a bit to 1 means that the RTC does not check if that value matches to trigger the alarm.

Alarm goes off with match of second, minute, hour, etc

Parameters
boolminuteAlarm: If True, the alarm will trigger on a match of the minutes
boolhourAlarm: If True, the alarm will trigger on a match of the hours
boolweekdayAlarm: If True, the alarm will trigger on a match of the weekday
booldateAlarm: If True, the alarm will trigger on a match of the date

◆ set_local_epoch()

def qwiic_rv8803.QwiicRV8803.set_local_epoch (   self,
  value,
  use1970sEpoch = True 
)

Set the local epoch - without adding the time zone.

Parameters
intvalue: The epoch time
booluse1970sEpoch: If True, the epoch is in the 1970s

◆ set_minutes()

def qwiic_rv8803.QwiicRV8803.set_minutes (   self,
  value 
)

Sets the minutes value.

Parameters
intvalue: The minutes value
Returns
bool True if successful, otherwise False

◆ set_month()

def qwiic_rv8803.QwiicRV8803.set_month (   self,
  value 
)

Sets the month value.

Parameters
intvalue: The month value
Returns
bool True if successful, otherwise False

◆ set_periodic_time_update_frequency()

def qwiic_rv8803.QwiicRV8803.set_periodic_time_update_frequency (   self,
  time_update_frequency 
)

Sets the periodic time update frequency.

Parameters
booltime_update_frequency: The time update frequency

◆ set_seconds()

def qwiic_rv8803.QwiicRV8803.set_seconds (   self,
  value 
)

Sets the seconds value.

Parameters
intvalue: The seconds value
Returns
bool True if successful, otherwise False

◆ set_time()

def qwiic_rv8803.QwiicRV8803.set_time (   self,
  seconds,
  minutes,
  hours,
  weekday,
  date,
  month,
  year 
)

Sets the time using individual values.

Parameters
intseconds: The seconds value
intminutes: The minutes value
inthours: The hours value
intweekday: The weekday value
intdate: The date value
intmonth: The month value
intyear: The year value
Returns
bool True if successful, otherwise False

◆ set_time_list()

def qwiic_rv8803.QwiicRV8803.set_time_list (   self,
  time_list 
)

Sets the time using a list of bytes.

Parameters
listtime_list: A list of bytes representing the time
Returns
bool True if successful, otherwise False

◆ set_time_zone_quarter_hours()

def qwiic_rv8803.QwiicRV8803.set_time_zone_quarter_hours (   self,
  quarter_hours 
)

Sets the time zone in quarter hours.

Parameters
intquarter_hours: The time zone offset in 15 minute increments
Returns
bool True if successful, otherwise False

◆ set_weekday()

def qwiic_rv8803.QwiicRV8803.set_weekday (   self,
  value 
)

Sets the weekday value.

Parameters
intvalue: The weekday value Allowable Values:
  • kSunday
  • kMonday
  • kTuesday
  • kWednesday
  • kThursday
  • kFriday
  • kSaturday
Returns
bool True if successful, otherwise False

◆ set_year()

def qwiic_rv8803.QwiicRV8803.set_year (   self,
  value 
)

Sets the year value.

Parameters
intvalue: The year value (specify full year, including the "20" prefix i.e. 2024 rather than 24)
Returns
bool True if successful, otherwise False

◆ string_date()

def qwiic_rv8803.QwiicRV8803.string_date (   self)

Returns the date in the DD/MM/YYYY format.

◆ string_date_ordinal()

def qwiic_rv8803.QwiicRV8803.string_date_ordinal (   self)

Return the ordinal for the date (day of month).

Returns "1st", "2nd", "3rd", "4th" etc

◆ string_date_usa()

def qwiic_rv8803.QwiicRV8803.string_date_usa (   self)

Returns the date in MM/DD/YYYY format.

◆ string_day_of_week()

def qwiic_rv8803.QwiicRV8803.string_day_of_week (   self)

Returns the day of the week as a string.

Returns
str The day of the week as a string

◆ string_day_of_week_short()

def qwiic_rv8803.QwiicRV8803.string_day_of_week_short (   self)

Return the day of week.

Returns "Sun", "Mon" etc

Returns
str The day of the week as a string

◆ string_month()

def qwiic_rv8803.QwiicRV8803.string_month (   self)

Return the name of the month.

Returns "January", etc

Returns
str The month as a string

◆ string_month_short()

def qwiic_rv8803.QwiicRV8803.string_month_short (   self)

Return the name of the month (short).

Returns "Jan", "Feb" etc

Returns
str The month as a string

◆ string_time()

def qwiic_rv8803.QwiicRV8803.string_time (   self)

Returns the time in hh:mm:ss (Adds AM/PM if in 12 hour mode)

◆ string_time_8601()

def qwiic_rv8803.QwiicRV8803.string_time_8601 (   self)

Returns timestamp in ISO 8601 format (yyyy-mm-ddThh:mm:ss)

◆ string_time_8601_TZ()

def qwiic_rv8803.QwiicRV8803.string_time_8601_TZ (   self)

Returns timestamp in ISO 8601 format (yyyy-mm-ddThh:mm:ss) and uses timezone corrections.

◆ string_timestamp()

def qwiic_rv8803.QwiicRV8803.string_timestamp (   self)

Returns the most recent timestamp captured on the EVI pin (if the EVI pin has been configured to capture events)

◆ update_time()

def qwiic_rv8803.QwiicRV8803.update_time (   self)

Updates the time by reading the time from the RTC and storing it in the time list.

Move the hours, mins, sec, etc registers from RV-8803 into the _time array Needs to be called before printing time or date We do not protect the GPx registers. They will be overwritten. The user has plenty of RAM if they need it.

◆ write_bit()

def qwiic_rv8803.QwiicRV8803.write_bit (   self,
  reg,
  bit,
  val 
)

Writes a bit to a register.

Parameters
intreg: The register to write to
intbit: The bit to write
boolval: The value to write

◆ write_two_bits()

def qwiic_rv8803.QwiicRV8803.write_two_bits (   self,
  reg,
  bit,
  val 
)

Writes two bits to a register.

Parameters
intreg: The register to write to
intbit: The bit to write
intval: The value to write

Member Data Documentation

◆ address

qwiic_rv8803.QwiicRV8803.address

◆ available_addresses

qwiic_rv8803.QwiicRV8803.available_addresses = _AVAILABLE_I2C_ADDRESS
static

◆ device_name

qwiic_rv8803.QwiicRV8803.device_name = _DEFAULT_NAME
static

◆ kAlarmEnable

int qwiic_rv8803.QwiicRV8803.kAlarmEnable = 7
static

◆ kAlarmInterrupt

int qwiic_rv8803.QwiicRV8803.kAlarmInterrupt = 3
static

◆ kClockOutFrequency1024Hz

int qwiic_rv8803.QwiicRV8803.kClockOutFrequency1024Hz = 0b01
static

◆ kClockOutFrequency1Hz

int qwiic_rv8803.QwiicRV8803.kClockOutFrequency1Hz = 0b10
static

◆ kClockOutFrequency32768Hz

int qwiic_rv8803.QwiicRV8803.kClockOutFrequency32768Hz = 0b00
static

◆ kControlReset

int qwiic_rv8803.QwiicRV8803.kControlReset = 0
static

◆ kCountdownTimerFrequency1_60thHz

int qwiic_rv8803.QwiicRV8803.kCountdownTimerFrequency1_60thHz = 0b11
static

◆ kCountdownTimerFrequency1Hz

int qwiic_rv8803.QwiicRV8803.kCountdownTimerFrequency1Hz = 0b10
static

◆ kCountdownTimerFrequency4096Hz

int qwiic_rv8803.QwiicRV8803.kCountdownTimerFrequency4096Hz = 0b00
static

◆ kCountdownTimerFrequency64Hz

int qwiic_rv8803.QwiicRV8803.kCountdownTimerFrequency64Hz = 0b01
static

◆ kCountdownTimerOff

bool qwiic_rv8803.QwiicRV8803.kCountdownTimerOff = False
static

◆ kCountdownTimerOn

bool qwiic_rv8803.QwiicRV8803.kCountdownTimerOn = True
static

◆ kDisableEviCalibration

bool qwiic_rv8803.QwiicRV8803.kDisableEviCalibration = False
static

◆ kEnableEviCalibration

bool qwiic_rv8803.QwiicRV8803.kEnableEviCalibration = True
static

◆ kEventEcp

int qwiic_rv8803.QwiicRV8803.kEventEcp = 7
static

◆ kEventEhl

int qwiic_rv8803.QwiicRV8803.kEventEhl = 6
static

◆ kEventErst

int qwiic_rv8803.QwiicRV8803.kEventErst = 0
static

◆ kEventEt

int qwiic_rv8803.QwiicRV8803.kEventEt = 4
static

◆ kEviCaptureDisable

bool qwiic_rv8803.QwiicRV8803.kEviCaptureDisable = False
static

◆ kEviCaptureEnable

bool qwiic_rv8803.QwiicRV8803.kEviCaptureEnable = True
static

◆ kEviDebounce256Hz

int qwiic_rv8803.QwiicRV8803.kEviDebounce256Hz = 0b01
static

◆ kEviDebounce64Hz

int qwiic_rv8803.QwiicRV8803.kEviDebounce64Hz = 0b10
static

◆ kEviDebounce8Hz

int qwiic_rv8803.QwiicRV8803.kEviDebounce8Hz = 0b11
static

◆ kEviDebounceNone

int qwiic_rv8803.QwiicRV8803.kEviDebounceNone = 0b00
static

◆ kEviInterrupt

int qwiic_rv8803.QwiicRV8803.kEviInterrupt = 2
static

◆ kExtensionFd

int qwiic_rv8803.QwiicRV8803.kExtensionFd = 2
static

◆ kExtensionTd

int qwiic_rv8803.QwiicRV8803.kExtensionTd = 0
static

◆ kExtensionTe

int qwiic_rv8803.QwiicRV8803.kExtensionTe = 4
static

◆ kExtensionTest

int qwiic_rv8803.QwiicRV8803.kExtensionTest = 7
static

◆ kExtensionUsel

int qwiic_rv8803.QwiicRV8803.kExtensionUsel = 5
static

◆ kExtensionWada

int qwiic_rv8803.QwiicRV8803.kExtensionWada = 6
static

◆ kFallingEdge

bool qwiic_rv8803.QwiicRV8803.kFallingEdge = False
static

◆ kFlagAlarm

int qwiic_rv8803.QwiicRV8803.kFlagAlarm = 3
static

◆ kFlagEvi

int qwiic_rv8803.QwiicRV8803.kFlagEvi = 2
static

◆ kFlagTimer

int qwiic_rv8803.QwiicRV8803.kFlagTimer = 4
static

◆ kFlagUpdate

int qwiic_rv8803.QwiicRV8803.kFlagUpdate = 5
static

◆ kFlagV1f

int qwiic_rv8803.QwiicRV8803.kFlagV1f = 0
static

◆ kFlagV2f

int qwiic_rv8803.QwiicRV8803.kFlagV2f = 1
static

◆ kFriday

int qwiic_rv8803.QwiicRV8803.kFriday = 0x20
static

◆ kIdxDate

int qwiic_rv8803.QwiicRV8803.kIdxDate = 5
static

◆ kIdxHours

int qwiic_rv8803.QwiicRV8803.kIdxHours = 3
static

◆ kIdxHundredths

int qwiic_rv8803.QwiicRV8803.kIdxHundredths = 0
static

◆ kIdxMinutes

int qwiic_rv8803.QwiicRV8803.kIdxMinutes = 2
static

◆ kIdxMonth

int qwiic_rv8803.QwiicRV8803.kIdxMonth = 6
static

◆ kIdxSeconds

int qwiic_rv8803.QwiicRV8803.kIdxSeconds = 1
static

◆ kIdxWeekday

int qwiic_rv8803.QwiicRV8803.kIdxWeekday = 4
static

◆ kIdxYear

int qwiic_rv8803.QwiicRV8803.kIdxYear = 7
static

◆ kMonday

int qwiic_rv8803.QwiicRV8803.kMonday = 0x02
static

◆ kRegControl

int qwiic_rv8803.QwiicRV8803.kRegControl = 0x1F
static

◆ kRegDate

int qwiic_rv8803.QwiicRV8803.kRegDate = 0x15
static

◆ kRegEventControl

int qwiic_rv8803.QwiicRV8803.kRegEventControl = 0x2F
static

◆ kRegExtension

int qwiic_rv8803.QwiicRV8803.kRegExtension = 0x1D
static

◆ kRegFlag

int qwiic_rv8803.QwiicRV8803.kRegFlag = 0x1E
static

◆ kRegHours

int qwiic_rv8803.QwiicRV8803.kRegHours = 0x13
static

◆ kRegHoursAlarm

int qwiic_rv8803.QwiicRV8803.kRegHoursAlarm = 0x19
static

◆ kRegHundredths

int qwiic_rv8803.QwiicRV8803.kRegHundredths = 0x10
static

◆ kRegHundredthsCapture

int qwiic_rv8803.QwiicRV8803.kRegHundredthsCapture = 0x20
static

◆ kRegMinutes

int qwiic_rv8803.QwiicRV8803.kRegMinutes = 0x12
static

◆ kRegMinutesAlarm

int qwiic_rv8803.QwiicRV8803.kRegMinutesAlarm = 0x18
static

◆ kRegMonths

int qwiic_rv8803.QwiicRV8803.kRegMonths = 0x16
static

◆ kRegOffset

int qwiic_rv8803.QwiicRV8803.kRegOffset = 0x2C
static

◆ kRegRAM

int qwiic_rv8803.QwiicRV8803.kRegRAM = 0x07
static

◆ kRegSeconds

int qwiic_rv8803.QwiicRV8803.kRegSeconds = 0x11
static

◆ kRegSecondsCapture

int qwiic_rv8803.QwiicRV8803.kRegSecondsCapture = 0x21
static

◆ kRegTimer0

int qwiic_rv8803.QwiicRV8803.kRegTimer0 = 0x1B
static

◆ kRegTimer1

int qwiic_rv8803.QwiicRV8803.kRegTimer1 = 0x1C
static

◆ kRegWeekdays

int qwiic_rv8803.QwiicRV8803.kRegWeekdays = 0x14
static

◆ kRegWeekdaysDateAlarm

int qwiic_rv8803.QwiicRV8803.kRegWeekdaysDateAlarm = 0x1A
static

◆ kRegYears

int qwiic_rv8803.QwiicRV8803.kRegYears = 0x17
static

◆ kRisingEdge

bool qwiic_rv8803.QwiicRV8803.kRisingEdge = True
static

◆ kSaturday

int qwiic_rv8803.QwiicRV8803.kSaturday = 0x40
static

◆ kSunday

int qwiic_rv8803.QwiicRV8803.kSunday = 0x01
static

◆ kThursday

int qwiic_rv8803.QwiicRV8803.kThursday = 0x10
static

◆ kTimeListLength

int qwiic_rv8803.QwiicRV8803.kTimeListLength = 8
static

◆ kTimerInterrupt

int qwiic_rv8803.QwiicRV8803.kTimerInterrupt = 4
static

◆ kTimeUpdate1Minute

bool qwiic_rv8803.QwiicRV8803.kTimeUpdate1Minute = True
static

◆ kTimeUpdate1Second

bool qwiic_rv8803.QwiicRV8803.kTimeUpdate1Second = False
static

◆ kTmHour

int qwiic_rv8803.QwiicRV8803.kTmHour = 3
static

◆ kTmIsDST

int qwiic_rv8803.QwiicRV8803.kTmIsDST = 8
static

◆ kTmMDay

int qwiic_rv8803.QwiicRV8803.kTmMDay = 2
static

◆ kTmMinute

int qwiic_rv8803.QwiicRV8803.kTmMinute = 4
static

◆ kTmMonth

int qwiic_rv8803.QwiicRV8803.kTmMonth = 1
static

◆ kTmSecond

int qwiic_rv8803.QwiicRV8803.kTmSecond = 5
static

◆ kTmWDay

int qwiic_rv8803.QwiicRV8803.kTmWDay = 6
static

◆ kTmYDay

int qwiic_rv8803.QwiicRV8803.kTmYDay = 7
static

◆ kTmYear

int qwiic_rv8803.QwiicRV8803.kTmYear = 0
static

◆ kTuesday

int qwiic_rv8803.QwiicRV8803.kTuesday = 0x04
static

◆ kUpdateInterrupt

int qwiic_rv8803.QwiicRV8803.kUpdateInterrupt = 5
static

◆ kWednesday

int qwiic_rv8803.QwiicRV8803.kWednesday = 0x08
static

Property Documentation

◆ connected

qwiic_rv8803.QwiicRV8803.connected = property(is_connected)
static

The documentation for this class was generated from the following file: