denko 0.13.5 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (719) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/{build_avr.yml → build_atmega_avr.yml} +18 -18
  3. data/.github/workflows/{build_megaavr.yml → build_atmega_megaavr.yml} +18 -18
  4. data/.github/workflows/{build_sam3x.yml → build_atsam3x.yml} +17 -17
  5. data/.github/workflows/{build_samd.yml → build_atsamd21.yml} +18 -18
  6. data/.github/workflows/build_esp32.yml +17 -17
  7. data/.github/workflows/build_esp32c3.yml +57 -0
  8. data/.github/workflows/build_esp32c6.yml +57 -0
  9. data/.github/workflows/build_esp32h2.yml +56 -0
  10. data/.github/workflows/build_esp32s2.yml +57 -0
  11. data/.github/workflows/build_esp32s3.yml +57 -0
  12. data/.github/workflows/build_esp8266.yml +15 -15
  13. data/.github/workflows/build_ra4m1.yml +16 -16
  14. data/.github/workflows/build_rp2040.yml +17 -16
  15. data/.github/workflows/ruby.yml +20 -20
  16. data/CHANGELOG.md +195 -11
  17. data/DEPS_CLI.md +9 -9
  18. data/DEPS_IDE.md +17 -18
  19. data/HARDWARE.md +50 -51
  20. data/README.md +61 -53
  21. data/Rakefile +1 -1
  22. data/benchmarks/analog_listen.rb +49 -0
  23. data/benchmarks/digital_write.rb +28 -0
  24. data/benchmarks/i2c_ssd1306_refresh.rb +13 -6
  25. data/build +1 -1
  26. data/denko.gemspec +5 -2
  27. data/examples/advanced/{m5_env.rb → m5_env3.rb} +12 -14
  28. data/examples/advanced/rotary_encoder_mac_volume.rb +18 -13
  29. data/examples/advanced/ssd1306_time_temp_rh.rb +8 -13
  30. data/examples/analog_io/ads1100.rb +48 -0
  31. data/examples/analog_io/ads1115.rb +2 -2
  32. data/examples/analog_io/ads1118.rb +3 -11
  33. data/examples/analog_io/input.rb +17 -16
  34. data/examples/analog_io/input_smoothing.rb +27 -0
  35. data/examples/analog_io/potentiometer.rb +31 -0
  36. data/examples/connection/binary_echo.rb +34 -0
  37. data/examples/connection/tcp.rb +12 -27
  38. data/examples/digital_io/button.rb +7 -3
  39. data/examples/digital_io/relay.rb +17 -0
  40. data/examples/digital_io/rotary_encoder.rb +21 -11
  41. data/examples/display/hd44780.rb +13 -5
  42. data/examples/display/ssd1306.rb +20 -17
  43. data/examples/display/ssd1306_s2_pico.rb +2 -2
  44. data/examples/i2c/search.rb +10 -26
  45. data/examples/led/apa102_bounce.rb +3 -4
  46. data/examples/led/apa102_fade.rb +44 -0
  47. data/examples/led/builtin_blink.rb +3 -1
  48. data/examples/led/builtin_fade.rb +19 -0
  49. data/examples/led/rgb_led.rb +31 -0
  50. data/examples/led/seven_segment_char_echo.rb +4 -2
  51. data/examples/led/ws2812_bounce.rb +5 -7
  52. data/examples/led/ws2812_builtin_blink.rb +3 -2
  53. data/examples/led/ws2812_fade.rb +43 -0
  54. data/examples/motor/l298.rb +10 -8
  55. data/examples/motor/servo.rb +4 -3
  56. data/examples/motor/stepper.rb +13 -13
  57. data/examples/one_wire/search.rb +32 -0
  58. data/examples/pulse_io/buzzer.rb +8 -3
  59. data/examples/pulse_io/ir_output.rb +51 -0
  60. data/examples/pulse_io/pwm_output.rb +30 -0
  61. data/examples/rtc/ds3231.rb +18 -35
  62. data/examples/sensor/aht10.rb +4 -6
  63. data/examples/sensor/aht20.rb +4 -6
  64. data/examples/sensor/bme280.rb +4 -4
  65. data/examples/sensor/bmp180.rb +9 -5
  66. data/examples/sensor/dht.rb +20 -15
  67. data/examples/sensor/ds18b20.rb +20 -21
  68. data/examples/sensor/generic_pir.rb +4 -2
  69. data/examples/sensor/hcsr04.rb +5 -2
  70. data/examples/sensor/htu21d.rb +9 -20
  71. data/examples/sensor/htu31d.rb +7 -9
  72. data/examples/sensor/neat_tph_readings.rb +15 -9
  73. data/examples/sensor/qmp6988.rb +5 -7
  74. data/examples/sensor/rcwl9620.rb +3 -3
  75. data/examples/sensor/sht3x.rb +4 -6
  76. data/examples/spi/bitbang_loopback.rb +46 -0
  77. data/examples/spi/input_register.rb +9 -19
  78. data/examples/spi/output_register.rb +9 -17
  79. data/examples/spi/ssd_through_registers.rb +28 -0
  80. data/examples/spi/two_registers.rb +18 -24
  81. data/examples/uart/bit_bang_demo.rb +25 -0
  82. data/examples/uart/board_passthrough.rb +19 -13
  83. data/examples/uart/hardware_loopback.rb +1 -1
  84. data/lib/denko/analog_io/ads1100.rb +127 -0
  85. data/lib/denko/analog_io/ads1115.rb +8 -25
  86. data/lib/denko/analog_io/ads1118.rb +10 -25
  87. data/lib/denko/analog_io/ads111x.rb +25 -11
  88. data/lib/denko/analog_io/input.rb +29 -55
  89. data/lib/denko/analog_io/input_helper.rb +42 -0
  90. data/lib/denko/analog_io/output.rb +5 -5
  91. data/lib/denko/analog_io/potentiometer.rb +6 -8
  92. data/lib/denko/analog_io.rb +2 -1
  93. data/lib/denko/behaviors/board_proxy.rb +13 -1
  94. data/lib/denko/behaviors/bus_controller.rb +1 -0
  95. data/lib/denko/behaviors/bus_controller_addressed.rb +1 -0
  96. data/lib/denko/behaviors/bus_peripheral.rb +3 -4
  97. data/lib/denko/behaviors/bus_peripheral_addressed.rb +8 -6
  98. data/lib/denko/behaviors/callbacks.rb +9 -7
  99. data/lib/denko/behaviors/component.rb +16 -14
  100. data/lib/denko/behaviors/input_pin.rb +14 -15
  101. data/lib/denko/behaviors/lifecycle.rb +51 -0
  102. data/lib/denko/behaviors/multi_pin.rb +22 -18
  103. data/lib/denko/behaviors/output_pin.rb +9 -4
  104. data/lib/denko/behaviors/single_pin.rb +1 -0
  105. data/lib/denko/behaviors/state.rb +15 -9
  106. data/lib/denko/behaviors/subcomponents.rb +72 -12
  107. data/lib/denko/behaviors.rb +2 -1
  108. data/lib/denko/board/core.rb +36 -18
  109. data/lib/denko/board/i2c.rb +14 -14
  110. data/lib/denko/board/i2c_bit_bang.rb +49 -0
  111. data/lib/denko/board/infrared.rb +6 -6
  112. data/lib/denko/board/led_array.rb +6 -5
  113. data/lib/denko/board/spi.rb +15 -10
  114. data/lib/denko/board/spi_bit_bang.rb +9 -7
  115. data/lib/denko/board.rb +35 -33
  116. data/lib/denko/connection/binary_echo.rb +17 -0
  117. data/lib/denko/connection/flow_control.rb +11 -15
  118. data/lib/denko/connection/handshake.rb +2 -0
  119. data/lib/denko/digital_io/button.rb +4 -0
  120. data/lib/denko/digital_io/c_bit_bang.rb +15 -0
  121. data/lib/denko/digital_io/input.rb +4 -5
  122. data/lib/denko/digital_io/output.rb +7 -6
  123. data/lib/denko/digital_io/relay.rb +2 -0
  124. data/lib/denko/digital_io/rotary_encoder.rb +78 -60
  125. data/lib/denko/digital_io.rb +1 -0
  126. data/lib/denko/display/hd44780.rb +136 -93
  127. data/lib/denko/display/sh1106.rb +42 -0
  128. data/lib/denko/display/ssd1306.rb +105 -45
  129. data/lib/denko/display.rb +1 -0
  130. data/lib/denko/eeprom/built_in.rb +19 -16
  131. data/lib/denko/i2c/bit_bang.rb +31 -0
  132. data/lib/denko/i2c/bus.rb +8 -36
  133. data/lib/denko/i2c/bus_common.rb +45 -0
  134. data/lib/denko/i2c/peripheral.rb +28 -19
  135. data/lib/denko/i2c.rb +2 -0
  136. data/lib/denko/led/apa102.rb +43 -29
  137. data/lib/denko/led/base.rb +8 -2
  138. data/lib/denko/led/rgb.rb +5 -7
  139. data/lib/denko/led/seven_segment.rb +24 -9
  140. data/lib/denko/led/ws2812.rb +10 -7
  141. data/lib/denko/message.rb +5 -0
  142. data/lib/denko/motor/l298.rb +11 -10
  143. data/lib/denko/motor/servo.rb +22 -10
  144. data/lib/denko/motor/stepper.rb +11 -14
  145. data/lib/denko/mutex_stub.rb +7 -0
  146. data/lib/denko/one_wire/bus.rb +9 -5
  147. data/lib/denko/one_wire/peripheral.rb +0 -3
  148. data/lib/denko/pulse_io/buzzer.rb +9 -3
  149. data/lib/denko/pulse_io/{ir_transmitter.rb → ir_output.rb} +9 -4
  150. data/lib/denko/pulse_io/pwm_output.rb +69 -15
  151. data/lib/denko/pulse_io.rb +3 -3
  152. data/lib/denko/rtc/ds3231.rb +11 -13
  153. data/lib/denko/sensor/aht.rb +22 -21
  154. data/lib/denko/sensor/bme280.rb +60 -63
  155. data/lib/denko/sensor/bmp180.rb +41 -38
  156. data/lib/denko/sensor/dht.rb +22 -5
  157. data/lib/denko/sensor/ds18b20.rb +40 -34
  158. data/lib/denko/sensor/hcsr04.rb +7 -5
  159. data/lib/denko/sensor/helper.rb +37 -0
  160. data/lib/denko/sensor/htu21d.rb +44 -55
  161. data/lib/denko/sensor/htu31d.rb +32 -33
  162. data/lib/denko/sensor/qmp6988.rb +25 -23
  163. data/lib/denko/sensor/rcwl9620.rb +2 -5
  164. data/lib/denko/sensor/sht3x.rb +23 -21
  165. data/lib/denko/sensor.rb +1 -2
  166. data/lib/denko/spi/base_register.rb +22 -22
  167. data/lib/denko/spi/bit_bang.rb +17 -51
  168. data/lib/denko/spi/bus.rb +15 -29
  169. data/lib/denko/spi/bus_common.rb +36 -0
  170. data/lib/denko/spi/input_register.rb +36 -30
  171. data/lib/denko/spi/output_register.rb +25 -40
  172. data/lib/denko/spi/peripheral.rb +93 -24
  173. data/lib/denko/spi.rb +6 -1
  174. data/lib/denko/uart/bit_bang.rb +5 -3
  175. data/lib/denko/uart/hardware.rb +9 -8
  176. data/lib/denko/version.rb +1 -1
  177. data/lib/denko.rb +10 -0
  178. data/lib/denko_cli/generator.rb +2 -2
  179. data/lib/denko_cli/packages.rb +8 -10
  180. data/lib/denko_cli/targets.rb +8 -8
  181. data/lib/denko_cli/targets.txt +4 -4
  182. data/lib/denko_cli/usage.txt +1 -1
  183. data/src/denko_ethernet.ino +0 -14
  184. data/src/denko_serial.ino +0 -14
  185. data/src/denko_wifi.ino +6 -15
  186. data/src/lib/Denko.cpp +39 -3
  187. data/src/lib/Denko.h +42 -26
  188. data/src/lib/DenkoCoreIO.cpp +60 -103
  189. data/src/lib/DenkoDefines.h +36 -31
  190. data/src/lib/DenkoI2C.cpp +54 -45
  191. data/src/lib/DenkoI2CBB.cpp +238 -0
  192. data/src/lib/DenkoIROut.cpp +12 -7
  193. data/src/lib/DenkoLEDArray.cpp +36 -13
  194. data/src/lib/DenkoSPI.cpp +6 -5
  195. data/src/lib/DenkoSPIBB.cpp +7 -6
  196. data/target.yml +37 -2
  197. data/test/analog_io/potentiometer_test.rb +10 -10
  198. data/test/behaviors/board_proxy_test.rb +1 -1
  199. data/test/behaviors/callbacks_test.rb +11 -3
  200. data/test/behaviors/component_test.rb +17 -9
  201. data/test/behaviors/input_pin_test.rb +14 -9
  202. data/test/behaviors/multi_pin_test.rb +14 -4
  203. data/test/behaviors/output_pin_test.rb +11 -8
  204. data/test/behaviors/poller_test.rb +1 -0
  205. data/test/behaviors/reader_test.rb +3 -2
  206. data/test/behaviors/subcomponents_test.rb +22 -2
  207. data/test/board/core_test.rb +15 -11
  208. data/test/board/i2c_test.rb +39 -33
  209. data/test/board/infrared_test.rb +1 -1
  210. data/test/board/message_test.rb +17 -11
  211. data/test/board/spi_test.rb +21 -21
  212. data/test/digital_io/button_test.rb +15 -0
  213. data/test/digital_io/relay_test.rb +18 -0
  214. data/test/digital_io/rotary_encoder_test.rb +80 -60
  215. data/test/eeprom/built_in_test.rb +9 -9
  216. data/test/i2c/bus_test.rb +30 -14
  217. data/test/i2c/peripheral_test.rb +36 -17
  218. data/test/led/base_test.rb +2 -1
  219. data/test/led/rgb_test.rb +6 -6
  220. data/test/led/seven_segment_test.rb +7 -7
  221. data/test/motor/servo_test.rb +1 -1
  222. data/test/motor/stepper_test.rb +2 -2
  223. data/test/one_wire/bus_test.rb +1 -0
  224. data/test/pulse_io/buzzer_test.rb +7 -4
  225. data/test/pulse_io/{ir_transmitter_test.rb → ir_output_test.rb} +10 -10
  226. data/test/pulse_io/pwm_output_test.rb +74 -18
  227. data/test/rtc/ds3231_test.rb +11 -13
  228. data/test/sensor/dht_test.rb +1 -1
  229. data/test/sensor/ds18b20_test.rb +4 -8
  230. data/test/spi/bus_test.rb +7 -7
  231. data/test/spi/input_register_test.rb +15 -15
  232. data/test/spi/output_register_test.rb +10 -28
  233. data/test/spi/peripheral_multi_pin_test.rb +53 -0
  234. data/test/spi/peripheral_single_pin_test.rb +48 -0
  235. data/test/test_helper.rb +36 -33
  236. data/tutorial/02-button/button.rb +5 -4
  237. data/tutorial/03-potentiometer/potentiometer.rb +9 -5
  238. data/tutorial/04-pwm_led/pwm_led.rb +14 -16
  239. data/tutorial/05-rgb_led/rgb_led.rb +6 -6
  240. data/tutorial/05-rgb_led/rgb_mapping.rb +11 -11
  241. data/vendor/board-maps/.gitignore +56 -0
  242. data/vendor/board-maps/.gitmodules +24 -0
  243. data/vendor/board-maps/BoardMap.h +1852 -0
  244. data/vendor/board-maps/README.md +52 -0
  245. data/vendor/board-maps/lib/boards_parser.rb +66 -0
  246. data/vendor/board-maps/lib/header_parser.rb +199 -0
  247. data/vendor/board-maps/run.rb +57 -0
  248. data/vendor/board-maps/yaml/0XCB_HELIOS.yml +48 -0
  249. data/vendor/board-maps/yaml/ADAFRUIT_CAMERA_ESP32S3.yml +11 -0
  250. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32C6.yml +15 -0
  251. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S2.yml +25 -0
  252. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S2_REVTFT.yml +25 -0
  253. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S2_TFT.yml +27 -0
  254. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3.yml +34 -0
  255. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3_NOPSRAM.yml +34 -0
  256. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3_REVTFT.yml +25 -0
  257. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3_TFT.yml +27 -0
  258. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32_V2.yml +34 -0
  259. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040.yml +48 -0
  260. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_ADALOGGER.yml +44 -0
  261. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_CAN.yml +48 -0
  262. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_DVI.yml +48 -0
  263. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_PROP_MAKER.yml +48 -0
  264. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_RFM.yml +48 -0
  265. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_SCORPIO.yml +48 -0
  266. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_THINKINK.yml +48 -0
  267. data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_USB_HOST.yml +48 -0
  268. data/vendor/board-maps/yaml/ADAFRUIT_ITSYBITSY_ESP32.yml +24 -0
  269. data/vendor/board-maps/yaml/ADAFRUIT_ITSYBITSY_RP2040.yml +48 -0
  270. data/vendor/board-maps/yaml/ADAFRUIT_KB2040_RP2040.yml +48 -0
  271. data/vendor/board-maps/yaml/ADAFRUIT_MACROPAD_RP2040.yml +48 -0
  272. data/vendor/board-maps/yaml/ADAFRUIT_MATRIXPORTAL_ESP32S3.yml +16 -0
  273. data/vendor/board-maps/yaml/ADAFRUIT_METRO_RP2040.yml +48 -0
  274. data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32C3.yml +13 -0
  275. data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32S2.yml +23 -0
  276. data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32S3_N4R2.yml +21 -0
  277. data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32S3_NOPSRAM.yml +21 -0
  278. data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32_PICO.yml +29 -0
  279. data/vendor/board-maps/yaml/ADAFRUIT_QTPY_RP2040.yml +48 -0
  280. data/vendor/board-maps/yaml/ADAFRUIT_STEMMAFRIEND_RP2040.yml +48 -0
  281. data/vendor/board-maps/yaml/ADAFRUIT_TRINKEYQT_RP2040.yml +48 -0
  282. data/vendor/board-maps/yaml/ALKS.yml +34 -0
  283. data/vendor/board-maps/yaml/AMKEN_BB.yml +48 -0
  284. data/vendor/board-maps/yaml/AMKEN_ES.yml +48 -0
  285. data/vendor/board-maps/yaml/AMKEN_REVELOP.yml +48 -0
  286. data/vendor/board-maps/yaml/AMKEN_REVELOP_PLUS.yml +48 -0
  287. data/vendor/board-maps/yaml/AMPERKA_WIFI_SLOT.yml +16 -0
  288. data/vendor/board-maps/yaml/ARTRONSHOP_RP2_NANO.yml +32 -0
  289. data/vendor/board-maps/yaml/ASL_CAN_X2.yml +41 -0
  290. data/vendor/board-maps/yaml/ATD143_S3.yml +41 -0
  291. data/vendor/board-maps/yaml/AVENTEN_S3_SYNC.yml +38 -0
  292. data/vendor/board-maps/yaml/AVR_ADK.yml +24 -0
  293. data/vendor/board-maps/yaml/AVR_BT.yml +16 -0
  294. data/vendor/board-maps/yaml/AVR_CIRCUITPLAY.yml +14 -0
  295. data/vendor/board-maps/yaml/AVR_DUEMILANOVE.yml +16 -0
  296. data/vendor/board-maps/yaml/AVR_ESPLORA.yml +20 -0
  297. data/vendor/board-maps/yaml/AVR_ETHERNET.yml +16 -0
  298. data/vendor/board-maps/yaml/AVR_FIO.yml +16 -0
  299. data/vendor/board-maps/yaml/AVR_GEMMA.yml +6 -0
  300. data/vendor/board-maps/yaml/AVR_INDUSTRIAL101.yml +20 -0
  301. data/vendor/board-maps/yaml/AVR_LEONARDO.yml +20 -0
  302. data/vendor/board-maps/yaml/AVR_LEONARDO_ETH.yml +20 -0
  303. data/vendor/board-maps/yaml/AVR_LILYPAD.yml +16 -0
  304. data/vendor/board-maps/yaml/AVR_LILYPAD_USB.yml +20 -0
  305. data/vendor/board-maps/yaml/AVR_LININO_ONE.yml +20 -0
  306. data/vendor/board-maps/yaml/AVR_MEGA.yml +24 -0
  307. data/vendor/board-maps/yaml/AVR_MEGA2560.yml +24 -0
  308. data/vendor/board-maps/yaml/AVR_MICRO.yml +20 -0
  309. data/vendor/board-maps/yaml/AVR_MINI.yml +16 -0
  310. data/vendor/board-maps/yaml/AVR_NANO.yml +16 -0
  311. data/vendor/board-maps/yaml/AVR_NANO_EVERY.yml +22 -0
  312. data/vendor/board-maps/yaml/AVR_NG.yml +16 -0
  313. data/vendor/board-maps/yaml/AVR_PRO.yml +16 -0
  314. data/vendor/board-maps/yaml/AVR_ROBOT_CONTROL.yml +22 -0
  315. data/vendor/board-maps/yaml/AVR_ROBOT_MOTOR.yml +19 -0
  316. data/vendor/board-maps/yaml/AVR_UNO.yml +16 -0
  317. data/vendor/board-maps/yaml/AVR_UNO_WIFI_DEV_ED.yml +16 -0
  318. data/vendor/board-maps/yaml/AVR_UNO_WIFI_REV2.yml +22 -0
  319. data/vendor/board-maps/yaml/AVR_YUN.yml +20 -0
  320. data/vendor/board-maps/yaml/AVR_YUNMINI.yml +20 -0
  321. data/vendor/board-maps/yaml/AirM2M_CORE_ESP32C3.yml +14 -0
  322. data/vendor/board-maps/yaml/BEE_DATA_LOGGER.yml +39 -0
  323. data/vendor/board-maps/yaml/BLING.yml +25 -0
  324. data/vendor/board-maps/yaml/BPI_BIT.yml +9 -0
  325. data/vendor/board-maps/yaml/BPI_LEAF_S3.yml +42 -0
  326. data/vendor/board-maps/yaml/BRIDGETEK_IDM2040_43A.yml +48 -0
  327. data/vendor/board-maps/yaml/BRIDGETEK_IDM2040_7A.yml +48 -0
  328. data/vendor/board-maps/yaml/BeeMotionS3.yml +45 -0
  329. data/vendor/board-maps/yaml/Bee_Motion.yml +30 -0
  330. data/vendor/board-maps/yaml/Bee_Motion_Mini.yml +13 -0
  331. data/vendor/board-maps/yaml/Bee_S3.yml +38 -0
  332. data/vendor/board-maps/yaml/Breadstick_Raspberry.yml +31 -0
  333. data/vendor/board-maps/yaml/CHALLENGER_2040_LORA_RP2040.yml +39 -0
  334. data/vendor/board-maps/yaml/CHALLENGER_2040_LTE_RP2040.yml +38 -0
  335. data/vendor/board-maps/yaml/CHALLENGER_2040_NFC_RP2040.yml +32 -0
  336. data/vendor/board-maps/yaml/CHALLENGER_2040_SDRTC_RP2040.yml +36 -0
  337. data/vendor/board-maps/yaml/CHALLENGER_2040_SUBGHZ_RP2040.yml +39 -0
  338. data/vendor/board-maps/yaml/CHALLENGER_2040_UWB_RP2040.yml +39 -0
  339. data/vendor/board-maps/yaml/CHALLENGER_2040_WIFI6_BLE_RP2040.yml +42 -0
  340. data/vendor/board-maps/yaml/CHALLENGER_2040_WIFI_BLE_RP2040.yml +42 -0
  341. data/vendor/board-maps/yaml/CHALLENGER_2040_WIFI_RP2040.yml +38 -0
  342. data/vendor/board-maps/yaml/CHALLENGER_NB_2040_WIFI_RP2040.yml +38 -0
  343. data/vendor/board-maps/yaml/CONNECTIVITY_2040_LTE_WIFI_BLE_RP2040.yml +48 -0
  344. data/vendor/board-maps/yaml/CRABIK_SLOT_ESP32_S3.yml +19 -0
  345. data/vendor/board-maps/yaml/CYTRON_MAKER_FEATHER_AIOT_S3.yml +29 -0
  346. data/vendor/board-maps/yaml/CYTRON_MAKER_NANO_RP2040.yml +48 -0
  347. data/vendor/board-maps/yaml/CYTRON_MAKER_PI_RP2040.yml +48 -0
  348. data/vendor/board-maps/yaml/CYTRON_MAKER_UNO_RP2040.yml +48 -0
  349. data/vendor/board-maps/yaml/CoreESP32.yml +53 -0
  350. data/vendor/board-maps/yaml/D1_MINI32.yml +45 -0
  351. data/vendor/board-maps/yaml/D1_UNO32.yml +28 -0
  352. data/vendor/board-maps/yaml/DATANOISETV_PICOADK.yml +48 -0
  353. data/vendor/board-maps/yaml/DEGZ_SUIBO_RP2040.yml +48 -0
  354. data/vendor/board-maps/yaml/DENKY.yml +35 -0
  355. data/vendor/board-maps/yaml/DENKY_PICOV3.yml +35 -0
  356. data/vendor/board-maps/yaml/DENKY_WROOM32.yml +35 -0
  357. data/vendor/board-maps/yaml/DEPARTMENT_OF_ALCHEMY_MINIMAIN_ESP32S2.yml +26 -0
  358. data/vendor/board-maps/yaml/DFROBOT_BEETLE_ESP32C6.yml +8 -0
  359. data/vendor/board-maps/yaml/DFROBOT_BEETLE_ESP32_C3.yml +14 -0
  360. data/vendor/board-maps/yaml/DFROBOT_BEETLE_RP2040.yml +48 -0
  361. data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_2_ESP32C6.yml +20 -0
  362. data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_2_ESP32E.yml +49 -0
  363. data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_2_ESP32S3.yml +38 -0
  364. data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_ESP32.yml +46 -0
  365. data/vendor/board-maps/yaml/DFROBOT_ROMEO_ESP32S3.yml +7 -0
  366. data/vendor/board-maps/yaml/DPTECHNICS_WALTER.yml +39 -0
  367. data/vendor/board-maps/yaml/DPU_ESP32.yml +35 -0
  368. data/vendor/board-maps/yaml/DYDK.yml +38 -0
  369. data/vendor/board-maps/yaml/DYDK1A.yml +37 -0
  370. data/vendor/board-maps/yaml/DYDK1Av2.yml +45 -0
  371. data/vendor/board-maps/yaml/DYG.yml +20 -0
  372. data/vendor/board-maps/yaml/DYM.yml +40 -0
  373. data/vendor/board-maps/yaml/DYMv2.yml +39 -0
  374. data/vendor/board-maps/yaml/D_Duino_32.yml +37 -0
  375. data/vendor/board-maps/yaml/ELECROW_CROWPANEL_7.yml +8 -0
  376. data/vendor/board-maps/yaml/ELECTRONICCATS_HUNTERCAT_NFC.yml +44 -0
  377. data/vendor/board-maps/yaml/ESP320.yml +8 -0
  378. data/vendor/board-maps/yaml/ESP32C2_DEV.yml +12 -0
  379. data/vendor/board-maps/yaml/ESP32C3_DEV.yml +14 -0
  380. data/vendor/board-maps/yaml/ESP32C3_DEVKIT_LIPO.yml +14 -0
  381. data/vendor/board-maps/yaml/ESP32C3_M1_I_KIT.yml +13 -0
  382. data/vendor/board-maps/yaml/ESP32C6_DEV.yml +15 -0
  383. data/vendor/board-maps/yaml/ESP32C6_EVB.yml +15 -0
  384. data/vendor/board-maps/yaml/ESP32C6_QWIIC_POCKET.yml +15 -0
  385. data/vendor/board-maps/yaml/ESP32C6_THING_PLUS.yml +15 -0
  386. data/vendor/board-maps/yaml/ESP32H2_DEV.yml +13 -0
  387. data/vendor/board-maps/yaml/ESP32H2_DEVKIT_LIPO.yml +13 -0
  388. data/vendor/board-maps/yaml/ESP32S2_DEV.yml +44 -0
  389. data/vendor/board-maps/yaml/ESP32S2_DEVKIT_LIPO.yml +44 -0
  390. data/vendor/board-maps/yaml/ESP32S2_DEVKIT_LIPO_USB.yml +44 -0
  391. data/vendor/board-maps/yaml/ESP32S2_THING_PLUS.yml +44 -0
  392. data/vendor/board-maps/yaml/ESP32S2_USB.yml +43 -0
  393. data/vendor/board-maps/yaml/ESP32S3_CAM_LCD.yml +7 -0
  394. data/vendor/board-maps/yaml/ESP32S3_DEV.yml +38 -0
  395. data/vendor/board-maps/yaml/ESP32S3_DEVKIT_LIPO.yml +42 -0
  396. data/vendor/board-maps/yaml/ESP32S3_POWERFEATHER.yml +22 -0
  397. data/vendor/board-maps/yaml/ESP32_DEV.yml +35 -0
  398. data/vendor/board-maps/yaml/ESP32_DEVKIT_LIPO.yml +35 -0
  399. data/vendor/board-maps/yaml/ESP32_EVB.yml +7 -0
  400. data/vendor/board-maps/yaml/ESP32_GATEWAY.yml +13 -0
  401. data/vendor/board-maps/yaml/ESP32_GATEWAY_C.yml +13 -0
  402. data/vendor/board-maps/yaml/ESP32_GATEWAY_E.yml +13 -0
  403. data/vendor/board-maps/yaml/ESP32_GATEWAY_F.yml +13 -0
  404. data/vendor/board-maps/yaml/ESP32_IOT_REDBOARD.yml +36 -0
  405. data/vendor/board-maps/yaml/ESP32_MICROMOD.yml +24 -0
  406. data/vendor/board-maps/yaml/ESP32_PICO.yml +35 -0
  407. data/vendor/board-maps/yaml/ESP32_POE.yml +7 -0
  408. data/vendor/board-maps/yaml/ESP32_POE_ISO.yml +7 -0
  409. data/vendor/board-maps/yaml/ESP32_S3R8N16.yml +3 -0
  410. data/vendor/board-maps/yaml/ESP32_S3_BOX.yml +19 -0
  411. data/vendor/board-maps/yaml/ESP32_S3_USB_OTG.yml +11 -0
  412. data/vendor/board-maps/yaml/ESP32_SBC_FABGL.yml +35 -0
  413. data/vendor/board-maps/yaml/ESP32_THING.yml +36 -0
  414. data/vendor/board-maps/yaml/ESP32_THING_PLUS.yml +33 -0
  415. data/vendor/board-maps/yaml/ESP32_THING_PLUS_C.yml +33 -0
  416. data/vendor/board-maps/yaml/ESP32_WROOM_DA.yml +35 -0
  417. data/vendor/board-maps/yaml/ESP32_WROVER_KIT.yml +35 -0
  418. data/vendor/board-maps/yaml/ESP8266_ADAFRUIT_HUZZAH.yml +9 -0
  419. data/vendor/board-maps/yaml/ESP8266_AGRUMINO_LEMON_V4.yml +8 -0
  420. data/vendor/board-maps/yaml/ESP8266_ARDUINO_PRIMO.yml +7 -0
  421. data/vendor/board-maps/yaml/ESP8266_ARDUINO_STAR_OTTO.yml +7 -0
  422. data/vendor/board-maps/yaml/ESP8266_ARDUINO_UNOWIFI.yml +9 -0
  423. data/vendor/board-maps/yaml/ESP8266_ESP01.yml +9 -0
  424. data/vendor/board-maps/yaml/ESP8266_ESP07.yml +20 -0
  425. data/vendor/board-maps/yaml/ESP8266_ESP12.yml +20 -0
  426. data/vendor/board-maps/yaml/ESP8266_ESP13.yml +17 -0
  427. data/vendor/board-maps/yaml/ESP8266_ESP210.yml +9 -0
  428. data/vendor/board-maps/yaml/ESP8266_ESPECTRO_CORE.yml +9 -0
  429. data/vendor/board-maps/yaml/ESP8266_ESPINO_ESP12.yml +9 -0
  430. data/vendor/board-maps/yaml/ESP8266_ESPINO_ESP13.yml +9 -0
  431. data/vendor/board-maps/yaml/ESP8266_ESPRESSO_LITE_V1.yml +9 -0
  432. data/vendor/board-maps/yaml/ESP8266_ESPRESSO_LITE_V2.yml +9 -0
  433. data/vendor/board-maps/yaml/ESP8266_GENERIC.yml +9 -0
  434. data/vendor/board-maps/yaml/ESP8266_INVENT_ONE.yml +22 -0
  435. data/vendor/board-maps/yaml/ESP8266_NODEMCU_ESP12.yml +20 -0
  436. data/vendor/board-maps/yaml/ESP8266_NODEMCU_ESP12E.yml +20 -0
  437. data/vendor/board-maps/yaml/ESP8266_OAK.yml +9 -0
  438. data/vendor/board-maps/yaml/ESP8266_PHOENIX_V1.yml +9 -0
  439. data/vendor/board-maps/yaml/ESP8266_PHOENIX_V2.yml +9 -0
  440. data/vendor/board-maps/yaml/ESP8266_SCHIRMILABS_EDUINO_WIFI.yml +25 -0
  441. data/vendor/board-maps/yaml/ESP8266_SONOFF_BASIC.yml +9 -0
  442. data/vendor/board-maps/yaml/ESP8266_SONOFF_S20.yml +9 -0
  443. data/vendor/board-maps/yaml/ESP8266_SONOFF_SV.yml +9 -0
  444. data/vendor/board-maps/yaml/ESP8266_SONOFF_TH.yml +9 -0
  445. data/vendor/board-maps/yaml/ESP8266_THING.yml +9 -0
  446. data/vendor/board-maps/yaml/ESP8266_THING_DEV.yml +9 -0
  447. data/vendor/board-maps/yaml/ESP8266_WEMOS_D1MINI.yml +18 -0
  448. data/vendor/board-maps/yaml/ESP8266_WEMOS_D1MINILITE.yml +18 -0
  449. data/vendor/board-maps/yaml/ESP8266_WEMOS_D1MINIPRO.yml +18 -0
  450. data/vendor/board-maps/yaml/ESP8266_WEMOS_D1R1.yml +25 -0
  451. data/vendor/board-maps/yaml/ESP8266_WEMOS_D1WROOM02.yml +18 -0
  452. data/vendor/board-maps/yaml/ESP8266_WIO_LINK.yml +9 -0
  453. data/vendor/board-maps/yaml/ESP8266_XINABOX_CW01.yml +9 -0
  454. data/vendor/board-maps/yaml/ESPECTRO32.yml +36 -0
  455. data/vendor/board-maps/yaml/ESPea32.yml +36 -0
  456. data/vendor/board-maps/yaml/ESPino32.yml +36 -0
  457. data/vendor/board-maps/yaml/ET-Board.yml +26 -0
  458. data/vendor/board-maps/yaml/EVN_ALPHA.yml +48 -0
  459. data/vendor/board-maps/yaml/EXTREMEELEXTRONICS_RC2040.yml +46 -0
  460. data/vendor/board-maps/yaml/Edgebox-ESP-100.yml +7 -0
  461. data/vendor/board-maps/yaml/FEATHERS2.yml +43 -0
  462. data/vendor/board-maps/yaml/FEATHERS2NEO.yml +31 -0
  463. data/vendor/board-maps/yaml/FEATHERS3.yml +32 -0
  464. data/vendor/board-maps/yaml/FEATHERS3NEO.yml +32 -0
  465. data/vendor/board-maps/yaml/FEATHER_ESP32.yml +32 -0
  466. data/vendor/board-maps/yaml/FLYBOARD2040_CORE.yml +48 -0
  467. data/vendor/board-maps/yaml/FRANZININHO_WIFI.yml +43 -0
  468. data/vendor/board-maps/yaml/FRANZININHO_WIFI_MSC.yml +43 -0
  469. data/vendor/board-maps/yaml/FROG_ESP32.yml +35 -0
  470. data/vendor/board-maps/yaml/FUNHOUSE_ESP32S2.yml +22 -0
  471. data/vendor/board-maps/yaml/GEEKBLE_ESP32C3.yml +14 -0
  472. data/vendor/board-maps/yaml/GEN4_IOD.yml +9 -0
  473. data/vendor/board-maps/yaml/GENERIC_RP2040.yml +48 -0
  474. data/vendor/board-maps/yaml/HEALTHYPI_4.yml +36 -0
  475. data/vendor/board-maps/yaml/HELTEC_CAPSULE_SENSOR_V3.yml +43 -0
  476. data/vendor/board-maps/yaml/HELTEC_WIFI_LORA_32_V3.yml +42 -0
  477. data/vendor/board-maps/yaml/HELTEC_WIRELESS_BRIDGE.yml +8 -0
  478. data/vendor/board-maps/yaml/HELTEC_WIRELESS_MINI_SHELL.yml +13 -0
  479. data/vendor/board-maps/yaml/HELTEC_WIRELESS_PAPER.yml +42 -0
  480. data/vendor/board-maps/yaml/HELTEC_WIRELESS_SHELL_V3.yml +42 -0
  481. data/vendor/board-maps/yaml/HELTEC_WIRELESS_STICK_LITE_V3.yml +30 -0
  482. data/vendor/board-maps/yaml/HELTEC_WIRELESS_STICK_V3.yml +41 -0
  483. data/vendor/board-maps/yaml/HELTEC_WIRELESS_TRACKER.yml +41 -0
  484. data/vendor/board-maps/yaml/HONEYLEMON.yml +36 -0
  485. data/vendor/board-maps/yaml/HORNBILL_ESP32_DEV.yml +36 -0
  486. data/vendor/board-maps/yaml/HORNBILL_ESP32_MINIMA.yml +19 -0
  487. data/vendor/board-maps/yaml/HT_DE01.yml +42 -0
  488. data/vendor/board-maps/yaml/ILABS_2040_RPICO32_RP2040.yml +47 -0
  489. data/vendor/board-maps/yaml/IMBRIOS_LOGSENS_V1P1.yml +23 -0
  490. data/vendor/board-maps/yaml/INTOROBOT_ESP32_DEV.yml +34 -0
  491. data/vendor/board-maps/yaml/IOXESP32.yml +36 -0
  492. data/vendor/board-maps/yaml/IOXESP32PS.yml +36 -0
  493. data/vendor/board-maps/yaml/LILYGO_T3S3_LR1121.yml +9 -0
  494. data/vendor/board-maps/yaml/LILYGO_T3S3_SX1262.yml +9 -0
  495. data/vendor/board-maps/yaml/LILYGO_T3S3_SX1276.yml +9 -0
  496. data/vendor/board-maps/yaml/LILYGO_T3S3_SX1278.yml +9 -0
  497. data/vendor/board-maps/yaml/LILYGO_T3S3_SX1280.yml +9 -0
  498. data/vendor/board-maps/yaml/LILYGO_T3S3_SX1280PA.yml +8 -0
  499. data/vendor/board-maps/yaml/LILYGO_T_DISPLAY.yml +35 -0
  500. data/vendor/board-maps/yaml/LILYGO_T_DISPLAY_S3.yml +32 -0
  501. data/vendor/board-maps/yaml/LILYGO_T_ETH_LITE.yml +21 -0
  502. data/vendor/board-maps/yaml/LIONBITS3_DEV.yml +34 -0
  503. data/vendor/board-maps/yaml/LOLIN32.yml +36 -0
  504. data/vendor/board-maps/yaml/LOLIN32_LITE.yml +36 -0
  505. data/vendor/board-maps/yaml/LOLIN_C3_MINI.yml +14 -0
  506. data/vendor/board-maps/yaml/LOLIN_C3_PICO.yml +14 -0
  507. data/vendor/board-maps/yaml/LOLIN_D32.yml +36 -0
  508. data/vendor/board-maps/yaml/LOLIN_D32_PRO.yml +36 -0
  509. data/vendor/board-maps/yaml/LOLIN_S2_MINI.yml +44 -0
  510. data/vendor/board-maps/yaml/LOLIN_S2_PICO.yml +44 -0
  511. data/vendor/board-maps/yaml/LOLIN_S3.yml +40 -0
  512. data/vendor/board-maps/yaml/LOLIN_S3_MINI.yml +40 -0
  513. data/vendor/board-maps/yaml/LOLIN_S3_MINI_PRO.yml +40 -0
  514. data/vendor/board-maps/yaml/LOLIN_S3_PRO.yml +40 -0
  515. data/vendor/board-maps/yaml/Lion_Bit_Dev_Board.yml +16 -0
  516. data/vendor/board-maps/yaml/LoPy.yml +38 -0
  517. data/vendor/board-maps/yaml/LoPy4.yml +38 -0
  518. data/vendor/board-maps/yaml/M5STACK_CAPSULE.yml +8 -0
  519. data/vendor/board-maps/yaml/M5STACK_CARDPUTER.yml +8 -0
  520. data/vendor/board-maps/yaml/M5STACK_CORE.yml +10 -0
  521. data/vendor/board-maps/yaml/M5STACK_CORES3.yml +8 -0
  522. data/vendor/board-maps/yaml/M5STACK_Core2.yml +9 -0
  523. data/vendor/board-maps/yaml/M5STACK_DIAL.yml +8 -0
  524. data/vendor/board-maps/yaml/M5STACK_FIRE.yml +9 -0
  525. data/vendor/board-maps/yaml/M5STACK_NANOC6.yml +17 -0
  526. data/vendor/board-maps/yaml/M5STACK_PAPER.yml +9 -0
  527. data/vendor/board-maps/yaml/M5STACK_POE_CAM.yml +5 -0
  528. data/vendor/board-maps/yaml/M5STACK_STAMP_C3.yml +13 -0
  529. data/vendor/board-maps/yaml/M5STACK_STAMP_PICO.yml +7 -0
  530. data/vendor/board-maps/yaml/M5STACK_STAMP_S3.yml +4 -0
  531. data/vendor/board-maps/yaml/M5STACK_STICKC.yml +9 -0
  532. data/vendor/board-maps/yaml/M5STACK_STICKC_PLUS.yml +9 -0
  533. data/vendor/board-maps/yaml/M5STACK_STICKC_PLUS2.yml +9 -0
  534. data/vendor/board-maps/yaml/M5STACK_TIMER_CAM.yml +10 -0
  535. data/vendor/board-maps/yaml/M5STACK_TOUGH.yml +9 -0
  536. data/vendor/board-maps/yaml/M5STACK_UNIT_CAM.yml +10 -0
  537. data/vendor/board-maps/yaml/M5STACK_UNIT_CAMS3.yml +4 -0
  538. data/vendor/board-maps/yaml/M5Stack_ATOM.yml +9 -0
  539. data/vendor/board-maps/yaml/M5Stack_ATOMS3.yml +7 -0
  540. data/vendor/board-maps/yaml/M5Stack_CoreInk.yml +9 -0
  541. data/vendor/board-maps/yaml/M5Stack_Station.yml +10 -0
  542. data/vendor/board-maps/yaml/MAGTAG29_ESP32S2.yml +31 -0
  543. data/vendor/board-maps/yaml/MAKERGO_C3_SUPERMINI.yml +14 -0
  544. data/vendor/board-maps/yaml/MARBLE_PICO.yml +48 -0
  545. data/vendor/board-maps/yaml/MELOPERO_COOKIE_RP2040.yml +48 -0
  546. data/vendor/board-maps/yaml/MELOPERO_SHAKE_RP2040.yml +48 -0
  547. data/vendor/board-maps/yaml/METEHOCA_AKANA_R1.yml +46 -0
  548. data/vendor/board-maps/yaml/METRO_ESP32S2.yml +44 -0
  549. data/vendor/board-maps/yaml/METRO_ESP32S3.yml +42 -0
  550. data/vendor/board-maps/yaml/MGBOT_IOTIK32A.yml +36 -0
  551. data/vendor/board-maps/yaml/MGBOT_IOTIK32B.yml +36 -0
  552. data/vendor/board-maps/yaml/MH_ET_LIVE_ESP32DEVKIT.yml +36 -0
  553. data/vendor/board-maps/yaml/MH_ET_LIVE_ESP32MINIKIT.yml +36 -0
  554. data/vendor/board-maps/yaml/MICROS2.yml +44 -0
  555. data/vendor/board-maps/yaml/MINIMA.yml +15 -0
  556. data/vendor/board-maps/yaml/MOD_WIFI_ESP8266.yml +9 -0
  557. data/vendor/board-maps/yaml/Metro.yml +8 -0
  558. data/vendor/board-maps/yaml/NAMINO_ARANCIO.yml +3 -0
  559. data/vendor/board-maps/yaml/NAMINO_BIANCO.yml +13 -0
  560. data/vendor/board-maps/yaml/NAMINO_ROSSO.yml +3 -0
  561. data/vendor/board-maps/yaml/NANO32.yml +36 -0
  562. data/vendor/board-maps/yaml/NANOS3.yml +25 -0
  563. data/vendor/board-maps/yaml/NANO_ESP32.yml +18 -0
  564. data/vendor/board-maps/yaml/NANO_RP2040_CONNECT.yml +35 -0
  565. data/vendor/board-maps/yaml/NEBULAS3.yml +32 -0
  566. data/vendor/board-maps/yaml/NEKOSYSTEMS_BL2040_MINI.yml +48 -0
  567. data/vendor/board-maps/yaml/NEWSAN_ARCHI.yml +48 -0
  568. data/vendor/board-maps/yaml/NOLOGO_ESP32C3_SUPER_MINI.yml +14 -0
  569. data/vendor/board-maps/yaml/NOLOGO_ESP32S3_PICO.yml +12 -0
  570. data/vendor/board-maps/yaml/NULLBITS_BIT_C_PRO.yml +48 -0
  571. data/vendor/board-maps/yaml/Node32s.yml +36 -0
  572. data/vendor/board-maps/yaml/NodeMCU_32S.yml +36 -0
  573. data/vendor/board-maps/yaml/ODROID_ESP32.yml +10 -0
  574. data/vendor/board-maps/yaml/OLIMEX_RP2040_PICO30_16MB.yml +48 -0
  575. data/vendor/board-maps/yaml/OLIMEX_RP2040_PICO30_2MB.yml +48 -0
  576. data/vendor/board-maps/yaml/ONEHORSE_ESP32_DEV.yml +34 -0
  577. data/vendor/board-maps/yaml/OPTA_ANALOG.yml +7 -0
  578. data/vendor/board-maps/yaml/OPTA_DIGITAL.yml +5 -0
  579. data/vendor/board-maps/yaml/OROCA_EDUBOT.yml +33 -0
  580. data/vendor/board-maps/yaml/PIMORONI_PGA2040.yml +48 -0
  581. data/vendor/board-maps/yaml/PIMORONI_PLASMA2040.yml +29 -0
  582. data/vendor/board-maps/yaml/PIMORONI_TINY2040.yml +44 -0
  583. data/vendor/board-maps/yaml/PINTRONIX_PINMAX.yml +42 -0
  584. data/vendor/board-maps/yaml/PORTENTA_C33.yml +28 -0
  585. data/vendor/board-maps/yaml/PROS3.yml +33 -0
  586. data/vendor/board-maps/yaml/PYCOM_GPY.yml +38 -0
  587. data/vendor/board-maps/yaml/Piranha.yml +22 -0
  588. data/vendor/board-maps/yaml/Pocket32.yml +36 -0
  589. data/vendor/board-maps/yaml/QUALIA_S3_RGB666.yml +15 -0
  590. data/vendor/board-maps/yaml/QUANTUM.yml +35 -0
  591. data/vendor/board-maps/yaml/RAKWIRELESS_RAK11300.yml +47 -0
  592. data/vendor/board-maps/yaml/RASPBERRY_PI_PICO.yml +48 -0
  593. data/vendor/board-maps/yaml/RASPBERRY_PI_PICO_W.yml +48 -0
  594. data/vendor/board-maps/yaml/REDPILL_ESP32S3.yml +41 -0
  595. data/vendor/board-maps/yaml/REDSCORP_RP2040_EINS.yml +35 -0
  596. data/vendor/board-maps/yaml/REDSCORP_RP2040_PROMINI.yml +35 -0
  597. data/vendor/board-maps/yaml/SAMD_CIRCUITPLAYGROUND_EXPRESS.yml +11 -0
  598. data/vendor/board-maps/yaml/SAMD_MKR1000.yml +20 -0
  599. data/vendor/board-maps/yaml/SAMD_MKRFox1200.yml +19 -0
  600. data/vendor/board-maps/yaml/SAMD_MKRGSM1400.yml +15 -0
  601. data/vendor/board-maps/yaml/SAMD_MKRNB1500.yml +15 -0
  602. data/vendor/board-maps/yaml/SAMD_MKRVIDOR4000.yml +19 -0
  603. data/vendor/board-maps/yaml/SAMD_MKRWAN1300.yml +18 -0
  604. data/vendor/board-maps/yaml/SAMD_MKRWAN1310.yml +18 -0
  605. data/vendor/board-maps/yaml/SAMD_MKRWIFI1010.yml +19 -0
  606. data/vendor/board-maps/yaml/SAMD_MKRZERO.yml +19 -0
  607. data/vendor/board-maps/yaml/SAMD_NANO_33_IOT.yml +13 -0
  608. data/vendor/board-maps/yaml/SAMD_TIAN.yml +15 -0
  609. data/vendor/board-maps/yaml/SAMD_ZERO.yml +14 -0
  610. data/vendor/board-maps/yaml/SAM_DUE.yml +28 -0
  611. data/vendor/board-maps/yaml/SAM_ZERO.yml +15 -0
  612. data/vendor/board-maps/yaml/SEA_PICRO.yml +48 -0
  613. data/vendor/board-maps/yaml/SEEED_INDICATOR_RP2040.yml +47 -0
  614. data/vendor/board-maps/yaml/SEEED_XIAO_RP2040.yml +29 -0
  615. data/vendor/board-maps/yaml/SENSEBOX_MCU_ESP32S2.yml +12 -0
  616. data/vendor/board-maps/yaml/SILICOGNITION_RP2040_SHIM.yml +30 -0
  617. data/vendor/board-maps/yaml/SOLDERPARTY_RP2040_STAMP.yml +48 -0
  618. data/vendor/board-maps/yaml/SONOFF_DUALR3.yml +35 -0
  619. data/vendor/board-maps/yaml/SPARKFUN_MICROMOD_RP2040.yml +48 -0
  620. data/vendor/board-maps/yaml/SPARKFUN_PROMICRO_RP2040.yml +48 -0
  621. data/vendor/board-maps/yaml/SPARKFUN_PRO_MICRO_ESP32C3.yml +24 -0
  622. data/vendor/board-maps/yaml/SPARKFUN_THINGPLUS_RP2040.yml +48 -0
  623. data/vendor/board-maps/yaml/TAMC_TERMOD_S3.yml +41 -0
  624. data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1262.yml +28 -0
  625. data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1268.yml +28 -0
  626. data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1276.yml +28 -0
  627. data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1278.yml +28 -0
  628. data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1280.yml +28 -0
  629. data/vendor/board-maps/yaml/TBeam.yml +28 -0
  630. data/vendor/board-maps/yaml/THINGPULSE_EPULSE_FEATHER.yml +31 -0
  631. data/vendor/board-maps/yaml/THINGPULSE_EPULSE_FEATHER_C6.yml +15 -0
  632. data/vendor/board-maps/yaml/TINYC6.yml +25 -0
  633. data/vendor/board-maps/yaml/TINYPICO.yml +35 -0
  634. data/vendor/board-maps/yaml/TINYS2.yml +43 -0
  635. data/vendor/board-maps/yaml/TINYS3.yml +25 -0
  636. data/vendor/board-maps/yaml/TTGO-T-OI-PLUS_DEV.yml +11 -0
  637. data/vendor/board-maps/yaml/TTGO_LoRa32_V1.yml +38 -0
  638. data/vendor/board-maps/yaml/TTGO_LoRa32_V2.yml +38 -0
  639. data/vendor/board-maps/yaml/TTGO_LoRa32_v21new.yml +38 -0
  640. data/vendor/board-maps/yaml/TTGO_T1.yml +36 -0
  641. data/vendor/board-maps/yaml/TTGO_T7_V13_Mini32.yml +36 -0
  642. data/vendor/board-maps/yaml/TTGO_T7_V14_Mini32.yml +36 -0
  643. data/vendor/board-maps/yaml/TWATCH_2020_V1.yml +9 -0
  644. data/vendor/board-maps/yaml/TWATCH_2020_V2.yml +9 -0
  645. data/vendor/board-maps/yaml/TWATCH_2020_V3.yml +9 -0
  646. data/vendor/board-maps/yaml/TWATCH_BASE.yml +9 -0
  647. data/vendor/board-maps/yaml/TWatch.yml +9 -0
  648. data/vendor/board-maps/yaml/Trueverit_ESP32_Universal_IoT_Driver.yml +18 -0
  649. data/vendor/board-maps/yaml/Trueverit_ESP32_Universal_IoT_Driver_MK_II.yml +18 -0
  650. data/vendor/board-maps/yaml/UBLOX_NINA_W10.yml +57 -0
  651. data/vendor/board-maps/yaml/UBLOX_NORA_W10.yml +43 -0
  652. data/vendor/board-maps/yaml/UNOWIFIR4.yml +17 -0
  653. data/vendor/board-maps/yaml/UPESY_EDU_ESP32.yml +28 -0
  654. data/vendor/board-maps/yaml/UPESY_ESP32C3_BASIC.yml +13 -0
  655. data/vendor/board-maps/yaml/UPESY_ESP32C3_MINI.yml +12 -0
  656. data/vendor/board-maps/yaml/UPESY_ESP32S3_BASIC.yml +42 -0
  657. data/vendor/board-maps/yaml/UPESY_RP2040_DEVKIT.yml +48 -0
  658. data/vendor/board-maps/yaml/VALTRACK_V4_MFW_ESP32_C3.yml +23 -0
  659. data/vendor/board-maps/yaml/VALTRACK_V4_VTS_ESP32_C3.yml +23 -0
  660. data/vendor/board-maps/yaml/VIRALINK_GATE32_01.yml +6 -0
  661. data/vendor/board-maps/yaml/VIRALINK_GATE32_11.yml +7 -0
  662. data/vendor/board-maps/yaml/VIYALAB_MIZU_RP2040.yml +48 -0
  663. data/vendor/board-maps/yaml/WATCHY.yml +7 -0
  664. data/vendor/board-maps/yaml/WATCHY_V10.yml +7 -0
  665. data/vendor/board-maps/yaml/WATCHY_V15.yml +7 -0
  666. data/vendor/board-maps/yaml/WATCHY_V20.yml +7 -0
  667. data/vendor/board-maps/yaml/WAVESHARE_ESP32S3_TOUCH_LCD_128.yml +8 -0
  668. data/vendor/board-maps/yaml/WAVESHARE_RP2040_LCD_0_96.yml +47 -0
  669. data/vendor/board-maps/yaml/WAVESHARE_RP2040_LCD_1_28.yml +47 -0
  670. data/vendor/board-maps/yaml/WAVESHARE_RP2040_MATRIX.yml +48 -0
  671. data/vendor/board-maps/yaml/WAVESHARE_RP2040_ONE.yml +48 -0
  672. data/vendor/board-maps/yaml/WAVESHARE_RP2040_PIZERO.yml +47 -0
  673. data/vendor/board-maps/yaml/WAVESHARE_RP2040_PLUS.yml +48 -0
  674. data/vendor/board-maps/yaml/WAVESHARE_RP2040_ZERO.yml +48 -0
  675. data/vendor/board-maps/yaml/WEACT_STUDIO_ESP32C3.yml +14 -0
  676. data/vendor/board-maps/yaml/WESP32.yml +17 -0
  677. data/vendor/board-maps/yaml/WIDORA_AIR.yml +34 -0
  678. data/vendor/board-maps/yaml/WIFIDUINO_ESP8266.yml +23 -0
  679. data/vendor/board-maps/yaml/WIFINFO.yml +20 -0
  680. data/vendor/board-maps/yaml/WIPY3.yml +38 -0
  681. data/vendor/board-maps/yaml/WIZNET_5100S_EVB_PICO.yml +48 -0
  682. data/vendor/board-maps/yaml/WIZNET_5500_EVB_PICO.yml +48 -0
  683. data/vendor/board-maps/yaml/WIZNET_WIZFI360_EVB_PICO.yml +48 -0
  684. data/vendor/board-maps/yaml/WT32_ETH01.yml +8 -0
  685. data/vendor/board-maps/yaml/WT32_SC01_PLUS.yml +7 -0
  686. data/vendor/board-maps/yaml/WiFiduino32S3.yml +27 -0
  687. data/vendor/board-maps/yaml/WiFiduinoV2.yml +28 -0
  688. data/vendor/board-maps/yaml/Wifiduino32.yml +40 -0
  689. data/vendor/board-maps/yaml/XIAO_ESP32C3.yml +21 -0
  690. data/vendor/board-maps/yaml/XIAO_ESP32C6.yml +22 -0
  691. data/vendor/board-maps/yaml/XIAO_ESP32S3.yml +37 -0
  692. data/vendor/board-maps/yaml/YD_RP2040.yml +48 -0
  693. data/vendor/board-maps/yaml/atmegazero_esp32s2.yml +30 -0
  694. data/vendor/board-maps/yaml/connaxio_espoir.yml +24 -0
  695. data/vendor/board-maps/yaml/esp32vn_iot_uno.yml +31 -0
  696. data/vendor/board-maps/yaml/fm_devkit.yml +15 -0
  697. data/vendor/board-maps/yaml/heltec_wifi_kit_32.yml +38 -0
  698. data/vendor/board-maps/yaml/heltec_wifi_kit_32_V3.yml +42 -0
  699. data/vendor/board-maps/yaml/heltec_wifi_lora_32.yml +36 -0
  700. data/vendor/board-maps/yaml/heltec_wifi_lora_32_V2.yml +36 -0
  701. data/vendor/board-maps/yaml/heltec_wireless_stick.yml +36 -0
  702. data/vendor/board-maps/yaml/heltec_wireless_stick_LITE.yml +36 -0
  703. data/vendor/board-maps/yaml/openkb.yml +37 -0
  704. data/vendor/board-maps/yaml/roboheart_hercules.yml +26 -0
  705. data/vendor/board-maps/yaml/sensesiot_weizen.yml +35 -0
  706. data/vendor/board-maps/yaml/uPesy_WROOM.yml +36 -0
  707. data/vendor/board-maps/yaml/uPesy_WROVER.yml +36 -0
  708. data/vendor/board-maps/yaml/unphone8.yml +42 -0
  709. data/vendor/board-maps/yaml/unphone9.yml +50 -0
  710. data/vendor/board-maps/yaml/wifi_kit_8.yml +15 -0
  711. metadata +541 -22
  712. data/examples/led/apa102_breathe.rb +0 -45
  713. data/examples/pulse_io/ir_transmitter.rb +0 -55
  714. data/examples/spi/ssd_through_register.rb +0 -40
  715. data/examples/uart/bit_bang_read.rb +0 -16
  716. data/examples/uart/bit_bang_write.rb +0 -16
  717. data/lib/denko/analog_io/sensor.rb +0 -6
  718. data/lib/denko/sensor/virtual.rb +0 -42
  719. data/src/lib/DenkoIROutESP.cpp +0 -26
@@ -4,28 +4,26 @@
4
4
  #
5
5
  require 'bundler/setup'
6
6
  require 'denko'
7
+ require_relative '../sensor/neat_tph_readings'
8
+
9
+ # How many degrees C the two temperature values can differ by before a warning.
10
+ TOLERANCE = 0.50
7
11
 
8
12
  board = Denko::Board.new(Denko::Connection::Serial.new)
9
- bus = Denko::I2C::Bus.new(board: board, pin: :SDA)
10
- sht = Denko::Sensor::SHT3X.new(bus: bus) # address: 0x44 default
11
- qmp = Denko::Sensor::QMP6988.new(bus: bus) # address: 0x70 default
13
+ bus = Denko::I2C::Bus.new(board: board)
14
+ sht = Denko::Sensor::SHT3X.new(bus: bus) # address: 0x44 default
15
+ qmp = Denko::Sensor::QMP6988.new(bus: bus) # address: 0x70 default
12
16
 
13
17
  # Configure for higher accuracy.
14
- sht.repeatability = :high
18
+ sht.repeatability = :high
15
19
  qmp.temperature_samples = 2
16
- qmp.pressure_samples = 16
17
- qmp.iir_coefficient = 2
20
+ qmp.pressure_samples = 16
21
+ qmp.iir_coefficient = 2
18
22
 
19
23
  # Buggy on ESP32-S3 in forced mode. Data registers return zeroes on all but first read.
20
24
  # Can't recreate on ESP32 V1, AVR or SAMD21. Put it in contiuous mode just in case.
21
25
  qmp.continuous_mode
22
26
 
23
- # Get the shared #print_tph_reading method to print readings neatly.
24
- require_relative '../sensor/neat_tph_readings'
25
-
26
- # How many degrees C the two temperature values can differ by before a warning.
27
- TOLERANCE = 0.50
28
-
29
27
  loop do
30
28
  # Read both sensors.
31
29
  qmp_reading = qmp.read
@@ -33,11 +31,11 @@ loop do
33
31
 
34
32
  # Retry immediately if either failed.
35
33
  next unless (sht_reading && qmp_reading)
36
-
34
+
37
35
  # Warn if large gap between temperature readings.
38
36
  difference = (qmp_reading[:temperature] - sht_reading[:temperature]).abs
39
37
  if (difference > TOLERANCE)
40
- puts "WARNING: temperature values differed by more than #{TOLERANCE}\xC2\xB0C (#{difference.round(4)} \xC2\xB0C actual)"
38
+ puts "WARNING: temperature values differed by more than #{TOLERANCE}\xC2\xB0C (#{difference.round(4)} \xC2\xB0C)"
41
39
  end
42
40
 
43
41
  # Combine values from both sensors, averaging their temperatures.
@@ -1,14 +1,15 @@
1
1
  #
2
- # Example using a rotary encoder to control audio output volume on a Mac.
2
+ # Example using a KY-040 (30 detent) rotary encoder as a mac volume control.
3
3
  #
4
4
  require 'bundler/setup'
5
5
  require 'denko'
6
6
 
7
- board = Denko::Board.new(Denko::Connection::Serial.new)
7
+ PIN_A = 4
8
+ PIN_B = 5
9
+
10
+ board = Denko::Board.new(Denko::Connection::Serial.new)
8
11
  encoder = Denko::DigitalIO::RotaryEncoder.new board: board,
9
- pins:{ clock: 4, data: 5 },
10
- divider: 1, # (default) read approx every divider ms
11
- steps_per_revolution: 30 # (default)
12
+ pins: { a: PIN_A, b: PIN_B }
12
13
 
13
14
  # Set up a pseudo terminal with osascript (AppleScript) in interactive mode.
14
15
  # Calling a separate script each update is too slow.
@@ -32,16 +33,20 @@ class AppleVolumeWrapper
32
33
  end
33
34
  end
34
35
 
35
- volume = AppleVolumeWrapper.new
36
- puts "Current volume: #{volume.get}%"
36
+ volumeWrapper= AppleVolumeWrapper.new
37
+ # volumeWrapper.get can return imprecise values.
38
+ # Display those, but keep exact value in this variable.
39
+ volume = volumeWrapper.get
40
+ puts "Current volume: #{volume}%"
37
41
 
38
42
  encoder.add_callback do |update|
39
- # Increase by 2% for every step so it responds faster.
40
- value = (volume.get + (update[:change] * 2))
41
- value = 0 if value < 0
42
- value = 100 if value > 100
43
- volume.set(value)
44
- current_volume = volume.get
43
+ # update[:change] is always either +1 or -1.
44
+ volume = volume += update[:change]
45
+ volume = 0 if volume < 0
46
+ volume = 100 if volume > 100
47
+
48
+ volumeWrapper.set(volume)
49
+ current_volume = volumeWrapper.get
45
50
  puts "Current volume: #{current_volume}%"
46
51
  end
47
52
 
@@ -8,17 +8,16 @@ require 'bundler/setup'
8
8
  require 'denko'
9
9
 
10
10
  board = Denko::Board.new(Denko::Connection::Serial.new)
11
- i2c = Denko::I2C::Bus.new(board: board, pin: :SDA)
11
+ i2c = Denko::I2C::Bus.new(board: board)
12
12
 
13
13
  # Get temperature and humidity every second.
14
14
  htu21d = Denko::Sensor::HTU21D.new(bus: i2c)
15
- htu21d.temperature.poll(1)
16
- htu21d.humidity.poll(1)
15
+ htu21d.poll(2)
17
16
 
18
- oled = Denko::Display::SSD1306.new(bus: i2c, rotate: true)
17
+ oled = Denko::Display::SSD1306.new(bus: i2c, rotate: true)
19
18
  canvas = oled.canvas
20
- last_refresh = Time.now
21
19
 
20
+ last_refresh = Time.now
22
21
  loop do
23
22
  elapsed = Time.now - last_refresh
24
23
 
@@ -29,15 +28,11 @@ loop do
29
28
  canvas.text_cursor = [0,0]
30
29
  canvas.print "Time: #{Time.now.strftime("%H:%M:%S.%L")}"
31
30
 
32
- if htu21d[:temperature]
33
- canvas.text_cursor = [0,8]
34
- canvas.print "Temp: " + ('%.3f' % htu21d[:temperature]).rjust(7, " ") + " C"
35
- end
31
+ canvas.text_cursor = [0,8]
32
+ canvas.print "Temp: " + ('%.3f' % htu21d.temperature).rjust(7, " ") + " C"
36
33
 
37
- if htu21d[:humidity]
38
- canvas.text_cursor = [0,16]
39
- canvas.print "Humidity: " + ('%.3f' % htu21d[:humidity]).rjust(7, " ") + " %"
40
- end
34
+ canvas.text_cursor = [0,16]
35
+ canvas.print "Humidity: " + ('%.3f' % htu21d.humidity).rjust(7, " ") + " %"
41
36
 
42
37
  # Only refresh the area in use.
43
38
  oled.draw(0, 127, 0, 24)
@@ -0,0 +1,48 @@
1
+ #
2
+ # Example using an ADS1100 ADC over the I2C bus.
3
+ #
4
+ require 'bundler/setup'
5
+ require 'denko'
6
+
7
+ # Helper method so readings look nice.
8
+ def print_reading(name, raw, voltage)
9
+ print "#{Time.now.strftime '%Y-%m-%d %H:%M:%S'} - "
10
+ print "#{name.rjust(9, " ")} | "
11
+ print "Raw: #{raw.to_s.rjust(6, " ")} | "
12
+ print "Voltage: "
13
+ print ("%.10f" % voltage).rjust(13, " ")
14
+ puts " V"
15
+ end
16
+
17
+ board = Denko::Board.new(Denko::Connection::Serial.new)
18
+ bus = Denko::I2C::Bus.new(board: board)
19
+
20
+ # Unlike the ADS1115/1118, full-scale voltage depends on Vdd. Give during setup.
21
+ # This works for my M5Stack ADC unit (0-12V) when checked against a multimeter.
22
+ ads = Denko::AnalogIO::ADS1100.new bus: bus,
23
+ full_scale_voltage: 26.408,
24
+ sample_rate: 16,
25
+ gain: 2
26
+ # address: 0x48 default
27
+
28
+ #
29
+ # Configure gain and sample rate. See datasheet for more info.
30
+ # Valid values:
31
+ # Gain: 1 (default), 2, 4, 8
32
+ # Sample Rate: 8 (default), 16, 32, 128
33
+ #
34
+ ads.gain = 1
35
+ ads.sample_rate = 8
36
+
37
+ # Configure smoothing.
38
+ ads.smoothing = true
39
+ ads.smoothing_size = 8
40
+
41
+ # Poll and print indefinitely.
42
+ ads.poll(0.25) do |reading|
43
+ # volts_per_bit calculated from full-scale voltage, gain and sample rate.
44
+ voltage = reading * ads.volts_per_bit
45
+ print_reading("ADS1100:", reading, voltage)
46
+ end
47
+
48
+ sleep
@@ -5,8 +5,8 @@ require 'bundler/setup'
5
5
  require 'denko'
6
6
 
7
7
  board = Denko::Board.new(Denko::Connection::Serial.new)
8
- bus = Denko::I2C::Bus.new(board: board, pin: :SDA)
9
- ads = Denko::AnalogIO::ADS1115.new(bus: bus)
8
+ bus = Denko::I2C::Bus.new(board: board)
9
+ ads = Denko::AnalogIO::ADS1115.new(bus: bus)
10
10
 
11
11
  # Helper method so readings look nice.
12
12
  def print_reading(name, raw, voltage)
@@ -5,16 +5,8 @@ require 'bundler/setup'
5
5
  require 'denko'
6
6
 
7
7
  board = Denko::Board.new(Denko::Connection::Serial.new)
8
-
9
- # Connect the ADS1118 pins to the board's default SPI pins.
10
- bus = Denko::SPI::Bus.new(board: board)
11
-
12
- # Or use a 2-way bit-bang SPI bus on any pins.
13
- # SPI_BIT_BANG_PINS = { clock: 13, input: 12, output: 11 }
14
- # bus = Denko::SPI::BitBang.new(board: board, pins: SPI_BIT_BANG_PINS)
15
-
16
- # Connect chip select/enable pin of the ADS1118 to pin 9.
17
- ads = Denko::AnalogIO::ADS1118.new(bus: bus, pin: 9)
8
+ bus = Denko::SPI::Bus.new(board: board)
9
+ ads = Denko::AnalogIO::ADS1118.new(bus: bus, pin: 10)
18
10
 
19
11
  # Helper method so readings look nice.
20
12
  def print_reading(name, raw, voltage)
@@ -29,7 +21,7 @@ end
29
21
  #
30
22
  # Read the ADS1118 internal temperature sensor.
31
23
  # This always uses the 128 SPS mode, and there is no polling method for it.
32
- #
24
+ #
33
25
  temperature = ads.temperature_read
34
26
  puts "ADS1118 Temperature: #{temperature} \xC2\xB0C"
35
27
  puts
@@ -1,32 +1,31 @@
1
1
  #
2
- # This example shows how to use your board's analog-to-digital-converter(ADC) pins,
3
- # through the AnalogIO::Input class. ADC inputs can be connected to sensors
4
- # which produce a variable output voltage, such as light dependent resistors,
5
- # or a simple temperature sensor like the TMP36.
2
+ # Use your board's analog-to-digital-converter(ADC) pins with AnalogIO::Input.
3
+ # ADC inputs can be connected to sensors that produce variable output voltage,
4
+ # such as light dependent resistors, or a temperature sensor like the TMP36.
6
5
  #
7
6
  require 'bundler/setup'
8
7
  require 'denko'
9
8
 
9
+ PIN = :A0
10
+
10
11
  board = Denko::Board.new(Denko::Connection::Serial.new)
11
- input = Denko::AnalogIO::Input.new(pin: :A0, board: board)
12
+ input = Denko::AnalogIO::Input.new(pin: PIN, board: board)
12
13
 
13
- # Single read that blocks the main thread. When a value is received, the given
14
- # code block runs only once, and then the main thread continues.
14
+ # Single read. Blocks main thread during read, then runs given block with the value.
15
15
  input.read { |value| puts "#{Time.now} Single read #1: #{value}" }
16
16
 
17
- # Read (poll) the input every half second. This happens in a separate thread,
18
- # so sleep the main thread for a while to get some values.
19
- # Given code block is added as a callback, and runs every time a value is received.
17
+ # Poll repeatedly does single reads, in a separate thread, with an interval in seconds.
18
+ # Given block is saved as a callback, and runs each time a value is received.
20
19
  input.poll(0.5) { |value| puts "#{Time.now} Polling: #{value}" }
21
- sleep 3
22
20
 
23
- # Stop polling. Automatically removes the #poll callback.
21
+ # Does not block main thread, so wait for some values.
22
+ sleep 3
23
+ # Stop polling, automatically removing callback from #poll.
24
24
  input.stop
25
25
 
26
- # Listening is similar to polling. The board reads the input and sends the value
27
- # every time interval, except it's keeping time. We only send the initial command,
28
- # not one for each read. Smaller intervals like 32 milliseconds are possible.
29
- # Powers of 2 from 1 to 128 are supported for listener intervals.
26
+ # "Listening" is where the Board keeps time, reading the ADC at a small interval
27
+ # and continuously sends values, until #stop is called.
28
+ # Powers of 2 from 1 to 128 (in milliseconds) are supported for listener intervals.
30
29
  input.listen(32) { |value| puts "#{Time.now} Listening: #{value}" }
31
30
  sleep 0.5
32
31
 
@@ -53,3 +52,5 @@ input.remove_callbacks(:test)
53
52
 
54
53
  # Remove all callbacks.
55
54
  input.remove_callbacks
55
+
56
+ board.finish_write
@@ -0,0 +1,27 @@
1
+ #
2
+ # This example shows how to smooth the input of an AnalogIO::Input.
3
+ #
4
+ require 'bundler/setup'
5
+ require 'denko'
6
+
7
+ PIN = :A0
8
+
9
+ board = Denko::Board.new(Denko::Connection::Serial.new)
10
+ input = Denko::AnalogIO::Input.new(pin: PIN, board: board)
11
+
12
+ # Enable smoothing on the input using the last 16 values.
13
+ input.smoothing = true
14
+ input.smoothing_size = 16
15
+
16
+ # Use the slowest listener possible.
17
+ input.listen(128)
18
+
19
+ #
20
+ # With these settings, the input's state should gradually change (~2 seconds),
21
+ # if you switch its supply from Vcc to Ground (or vice versa), instead of instantaneously.
22
+ #
23
+ # Print the state every 1/4 second. Change the voltage being input to the pin to see results.
24
+ loop do
25
+ puts input.state
26
+ sleep(0.25)
27
+ end
@@ -0,0 +1,31 @@
1
+ #
2
+ # Example for a potentiometer.
3
+ #
4
+ require 'bundler/setup'
5
+ require 'denko'
6
+
7
+ PIN = :A0
8
+
9
+ board = Denko::Board.new(Denko::Connection::Serial.new)
10
+ pot = Denko::AnalogIO::Potentiometer.new(pin: PIN, board: board)
11
+
12
+ last_percent = nil
13
+ pot.on_data do |reading|
14
+ # Map reading to a decimal between 0 and 1.
15
+ fraction = reading / board.adc_high.to_f
16
+
17
+ # Linearization hack for audio taper potentiometers.
18
+ # Adjust k for different tapers. This was an A500K.
19
+ k = 5
20
+ linearized = (fraction * (k + 1)) / ((k * fraction) + 1)
21
+ # Use this for linear potentiometers instead.
22
+ # linearized = fraction
23
+
24
+ percent = (linearized * 100).round
25
+ unless percent == last_percent
26
+ puts "Potentiometer: #{percent.to_s.rjust(3, " ")}%"
27
+ last_percent = percent
28
+ end
29
+ end
30
+
31
+ sleep
@@ -0,0 +1,34 @@
1
+ #
2
+ # Diagnostic to confirm board is receiving binary data
3
+ # (in aux message) properly.
4
+ #
5
+ require 'bundler/setup'
6
+ require 'denko'
7
+
8
+ board = Denko::Board.new(Denko::Connection::Serial.new)
9
+ echo = Denko::Connection::BinaryEcho.new(board: board, pin: 253)
10
+
11
+ min_byte = 0
12
+ max_byte = 255
13
+
14
+ expected_result = (min_byte..max_byte).to_a.join(',') << ','
15
+
16
+ waiting = false
17
+ wait_mutex = Mutex.new
18
+
19
+ echo.on_data do |data|
20
+ if data == expected_result
21
+ puts "#{Time.now.strftime '%Y-%m-%d %H:%M:%S'} - Echo received"
22
+ wait_mutex.synchronize { waiting = false }
23
+ end
24
+ end
25
+
26
+ loop do
27
+ wait_mutex.synchronize do
28
+ unless waiting
29
+ echo.test_range(min: min_byte, max: max_byte)
30
+ waiting = true
31
+ end
32
+ end
33
+ sleep 0.001
34
+ end
@@ -1,34 +1,19 @@
1
- require 'bundler/setup'
2
- require 'denko'
3
1
  #
4
- # This example shows how to use denko when connecting to a board via TCP.
5
- # This applies to the WiFi and Ethernet sketches, or serial sketch + ser2net.
6
- # Port number defaults to 3466 (denko), but may be given as a second argument.
7
- # It must correspond to the listening port set when the board was flashed.
2
+ # Connect to a Board via TCP. This works for WiFi and Ethernet sketches.
3
+ # Default port is 3466, and must match the port the Board was flashed to listen on.
8
4
  #
9
- connection = Denko::Connection::TCP.new("192.168.0.77", 3466)
10
- # connection = Denko::Connection::TCP.new("127.0.0.1")
11
- # connection = Denko::Connection::TCP.new("192.168.1.2", 3466)
12
- #
13
- board = Denko::Board.new(connection)
14
- led = Denko::LED.new(board: board, pin: :LED_BUILTIN)
5
+ require 'bundler/setup'
6
+ require 'denko'
7
+
8
+ IP_ADDRESS = "192.168.0.52"
9
+ PORT = 3466
10
+ PIN = :LED_BUILTIN
11
+
12
+ connection = Denko::Connection::TCP.new(IP_ADDRESS, PORT)
13
+ board = Denko::Board.new(connection)
14
+ led = Denko::LED.new(board: board, pin: PIN)
15
15
 
16
16
  [:on, :off].cycle do |switch|
17
17
  led.send(switch)
18
18
  sleep 0.5
19
19
  end
20
- #
21
- # ser2net can be used to simulate a TCP interface from a board running denko serial.
22
- # It serves the serial interface over a TCP port from the machine running ser2net.
23
- #
24
- # Example ser2net command for an Arduino UNO connected to a Mac:
25
- # ser2net -u -C "3466:raw:0:/dev/cu.usbmodem621:115200"
26
- #
27
- # Tell denko to connect to the IP address of the Mac, at port 3466.
28
- # Note: ser2net should be used in raw TCP mode, not telnet mode (more common).
29
- #
30
- # Replace /dev/cu.usbmodem621 with your denko serial device.
31
- # Arduino UNOs should be something like /dev/ttyACM0 under Linux.
32
- #
33
- # http://sourceforge.net/projects/ser2net/ for more info on installing and configuring ser2net.
34
- #
@@ -4,10 +4,14 @@
4
4
  require 'bundler/setup'
5
5
  require 'denko'
6
6
 
7
+ PIN = 3
8
+
7
9
  board = Denko::Board.new(Denko::Connection::Serial.new)
8
- button = Denko::DigitalIO::Button.new(board: board, pin: 5, pullup: true)
10
+ button = Denko::DigitalIO::Button.new board: board,
11
+ pin: PIN,
12
+ mode: :input_pullup
9
13
 
10
- button.up { puts "Button released!" }
11
- button.down { puts "Button pressed!" }
14
+ button.up { puts "Button released at #{Time.now.strftime '%H:%M:%S'}" }
15
+ button.down { puts "Button pressed at #{Time.now.strftime '%H:%M:%S'}" }
12
16
 
13
17
  sleep
@@ -0,0 +1,17 @@
1
+ #
2
+ # Use Relays to work with higher voltage circuits. This example
3
+ # closes and opens a relay to send a 500ms pulse on a 12V control circuit.
4
+ #
5
+ require 'bundler/setup'
6
+ require 'denko'
7
+
8
+ PIN = 6
9
+
10
+ board = Denko::Board.new(Denko::Connection::Serial.new)
11
+ relay = Denko::DigitalIO::Relay.new(board: board, pin: PIN)
12
+
13
+ relay.close
14
+ sleep(0.500)
15
+ relay.open
16
+
17
+ board.finish_write
@@ -1,26 +1,36 @@
1
1
  #
2
- # Example of a smiple rotary encoder polling at ~1ms.
2
+ # KY-040 (30 detent) rotary encoder on a microcontroller, listener at 1ms.
3
3
  #
4
- # WARNING: This method is not precise at all. Please do not use it for anything
5
- # that requires all steps to be read for precise positioning or high speed.
4
+ # WARNING: This method is not precise and may miss steps. Don't use for anything
5
+ # that requires all steps to be read for exact positioning or high speed.
6
6
  #
7
7
  require 'bundler/setup'
8
8
  require 'denko'
9
9
 
10
+ PIN_A = 4
11
+ PIN_B = 5
12
+
10
13
  board = Denko::Board.new(Denko::Connection::Serial.new)
11
- encoder = Denko::DigitalIO::RotaryEncoder.new board: board,
12
- pins: { clock: 4, data: 5 },
13
- divider: 1, # default, reads each pin every 1ms
14
- steps_per_revolution: 30 # default
15
14
 
16
- # Reverse direction if needed.
15
+ # Other options and their default values:
16
+ #
17
+ # divider: 1 # read every divider milliseconds (Board only)
18
+ # debounce_time: 1 # software debounce in microseconds (PiBoard only)
19
+ # counts_per_revolution: 60 # for generic 30 detent rotary encoders
20
+ #
21
+ encoder = Denko::DigitalIO::RotaryEncoder.new board: board,
22
+ pins: { a: PIN_A, b: PIN_B }
23
+
24
+ # Reverse direction.
17
25
  # encoder.reverse
18
26
 
19
- # Reset angle and steps to 0.
20
- encoder.reset
27
+ # Reset count and angle to 0.
28
+ # encoder.reset
21
29
 
22
30
  encoder.add_callback do |state|
23
- puts "Encoder moved #{state[:change]} steps | CW step count: #{state[:steps]} | Current angle: #{state[:angle]}\xC2\xB0"
31
+ change_printable = state[:change].to_s
32
+ change_printable = "+#{change_printable}" if state[:change] > 0
33
+ puts "Encoder Change: #{change_printable} | Count: #{state[:count]} | Angle: #{state[:angle]}\xC2\xB0"
24
34
  end
25
35
 
26
36
  sleep
@@ -4,11 +4,19 @@
4
4
  require 'bundler/setup'
5
5
  require 'denko'
6
6
 
7
+ # These pins match the SainSmart LCD Keypad Shield for Arduino boards.
8
+ RS = 8
9
+ EN = 9
10
+ D4 = 4
11
+ D5 = 5
12
+ D6 = 6
13
+ D7 = 7
14
+
7
15
  board = Denko::Board.new(Denko::Connection::Serial.new)
8
- lcd = Denko::Display::HD44780.new board: board,
9
- pins: { rs: 8, enable: 9, d4: 4, d5: 5, d6: 6, d7: 7 },
10
- cols: 16,
11
- rows: 2
16
+ lcd = Denko::Display::HD44780.new board: board,
17
+ pins: { rs: RS, enable: EN, d4: D4, d5: D5, d6: D6, d7: D7 },
18
+ cols: 16,
19
+ rows: 2
12
20
 
13
21
  # Bitmap for a custom character. 5 bits wide x 8 high.
14
22
  # Useful for generating these: https://omerk.github.io/lcdchargen/
@@ -20,7 +28,7 @@ heart = [ 0b00000,
20
28
  0b01110,
21
29
  0b00100,
22
30
  0b00000 ]
23
-
31
+
24
32
  # Define the character in CGRAM address 2. 0-7 are usable.
25
33
  lcd.create_char(2, heart)
26
34
 
@@ -6,26 +6,29 @@ require 'denko'
6
6
 
7
7
  board = Denko::Board.new(Denko::Connection::Serial.new)
8
8
 
9
+ # The SSD1306 OLED connects to either an I2C or SPI bus, depending on the model you have.
10
+ # Bus setup exampels in order:
11
+ # I2C Hardware
12
+ # I2C Bit-Bang
13
+ # SPI Hardware
14
+ # SPI Bit-Bang
9
15
  #
10
- # Default pins for the I2C0 (first) interface on most chips:
11
- #
12
- # ATmega 328p: SDA = 'A4' SCL = 'A5' - Arduino Uno, Nano
13
- # ATmega 32u4: SDA = 2 SCL = 3 - Arduino Leonardo, Pro Micro
14
- # ATmega1280 / 2560: SDA = 20 SCL = 21 - Arduino Mega
15
- # SAM3X8E: SDA = 20 SCL = 21 - Arduino Due
16
- # SAMD21G18: SDA = 20 SCL = 21 - Arduino Zero, M0, M0 Pro
17
- # ESP8266: SDA = 4 SCL = 5
18
- # ESP32: SDA = 21 SCL = 22
19
- # RP2040: SDA = 4 SCL = 5 - Raspberry Pi Pico (W)
20
- #
21
- # Only give the SDA pin of the I2C bus. SCL (clock) pin must be
22
- # connected for it to work, but we don't need to control it.
23
- #
24
- bus = Denko::I2C::Bus.new(board: board, pin: :SDA)
25
- oled = Denko::Display::SSD1306.new(bus: bus, rotate: true)
26
- canvas = oled.canvas
16
+ bus = Denko::I2C::Bus.new(board: board)
17
+ # bus = Denko::I2C::BitBang.new(board: board, pins: {scl: 4, sda: 5})
18
+ # bus = Denko::SPI::Bus.new(board: board)
19
+ # bus = Denko::SPI::BitBang.new(board: board, pins: {clock: 13, output: 11})
20
+
21
+ # I2C OLED, connected to I2C SDA and SCL.
22
+ oled = Denko::Display::SSD1306.new(bus: bus, rotate: true) # address: 0x3C is default
23
+ # oled = Denko::Display::SH1106.new(bus: bus,rotate: true) # address: 0x3C is default
24
+
25
+ # SPI OLED, connected to SPI CLK and MOSI pins.
26
+ # select: and dc: pins must be given. reset is optional (can be pulled high instead).
27
+ # oled = Denko::Display::SSD1306.new(bus: bus, pins: { select: 10, dc: 7, reset: 8 }, rotate: true)
28
+ # oled = Denko::Display::SH1106.new(bus: bus, pins: { select: 10, dc: 7, reset: 8}, rotate: true)
27
29
 
28
30
  # Draw some text on the OLED's canvas (a Ruby memory buffer).
31
+ canvas = oled.canvas
29
32
  canvas.text_cursor = [27,60]
30
33
  canvas.print("Hello World!")
31
34
 
@@ -10,8 +10,8 @@ board = Denko::Board.new(Denko::Connection::Serial.new)
10
10
  reset = Denko::DigitalIO::Output.new(board: board, pin: 18)
11
11
  reset.high
12
12
 
13
- bus = Denko::I2C::Bus.new(board: board, pin: :SDA)
14
- oled = Denko::Display::SSD1306.new(bus: bus, width: 128, height: 32)
13
+ bus = Denko::I2C::Bus.new(board: board, pin: :SDA)
14
+ oled = Denko::Display::SSD1306.new(bus: bus, width: 128, height: 32)
15
15
  canvas = oled.canvas
16
16
 
17
17
  # Draw some text on the OLED's canvas (a Ruby memory buffer).