File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,7 +98,13 @@ const mp_obj_property_t rtc_rtc_datetime_obj = {
9898//| """The RTC calibration value as an `int`.
9999//|
100100//| A positive value speeds up the clock and a negative value slows it down.
101- //| Range and value is hardware specific, but one step is often approximately 1 ppm."""
101+ //| Range and value is hardware specific, but one step is often approximately 1 ppm::
102+ //|
103+ //| import rtc
104+ //| import time
105+ //|
106+ //| r = rtc.RTC()
107+ //| r.calibration = 1"""
102108//|
103109STATIC mp_obj_t rtc_rtc_obj_get_calibration (mp_obj_t self_in ) {
104110 int calibration = common_hal_rtc_get_calibration ();
Original file line number Diff line number Diff line change @@ -153,7 +153,13 @@ const mp_obj_property_t touchio_touchin_raw_value_obj = {
153153//| When the **TouchIn** object is created, an initial `raw_value` is read from the pin,
154154//| and then `threshold` is set to be 100 + that value.
155155//|
156- //| You can adjust `threshold` to make the pin more or less sensitive."""
156+ //| You can adjust `threshold` to make the pin more or less sensitive::
157+ //|
158+ //| import board
159+ //| import touchio
160+ //|
161+ //| touch = touchio.TouchIn(board.A1)
162+ //| touch.threshold = 7300"""
157163//|
158164STATIC mp_obj_t touchio_touchin_obj_get_threshold (mp_obj_t self_in ) {
159165 touchio_touchin_obj_t * self = MP_OBJ_TO_PTR (self_in );
You can’t perform that action at this time.
0 commit comments