diff --git a/drivers/display/ssd1306.py b/drivers/display/ssd1306.py index 34dca769e91f6641d41d0b2dc05472f14a9b37a5..ad57725e74beafc04b7d797b0108539499c97833 100644 --- a/drivers/display/ssd1306.py +++ b/drivers/display/ssd1306.py @@ -1,5 +1,6 @@ # MicroPython SSD1306 OLED driver, I2C and SPI interfaces +from micropython import const import time import framebuf diff --git a/drivers/nrf24l01/nrf24l01.py b/drivers/nrf24l01/nrf24l01.py index a244b0b25d5082191dd246a3735871ebe1b78ea0..3c79650bf0f3c11cf944cff6cebebe2acc79b324 100644 --- a/drivers/nrf24l01/nrf24l01.py +++ b/drivers/nrf24l01/nrf24l01.py @@ -1,6 +1,7 @@ """NRF24L01 driver for Micro Python """ +from micropython import const import pyb # nRF24L01+ registers diff --git a/drivers/sdcard/sdcard.py b/drivers/sdcard/sdcard.py index fc7a8af7c59b377c12cea6acdabace89366fc01a..191630aebd4aa05ab10bc57cddd86f0a1280fb3a 100644 --- a/drivers/sdcard/sdcard.py +++ b/drivers/sdcard/sdcard.py @@ -21,6 +21,7 @@ Example usage on ESP8266: """ +from micropython import const import time diff --git a/esp8266/modules/ds18x20.py b/esp8266/modules/ds18x20.py index fc53048f8e9c70f6f39e2cb99d4caee10b43a9fc..bf0609483594ad90756f900729b2a5ef032636c0 100644 --- a/esp8266/modules/ds18x20.py +++ b/esp8266/modules/ds18x20.py @@ -1,6 +1,8 @@ # DS18x20 temperature sensor driver for MicroPython. # MIT license; Copyright (c) 2016 Damien P. George +from micropython import const + _CONVERT = const(0x44) _RD_SCRATCH = const(0xbe) _WR_SCRATCH = const(0x4e) diff --git a/esp8266/modules/onewire.py b/esp8266/modules/onewire.py index 06b216a57a6e46763eaf557824208b71dffe88d5..83318d1a4727c15b18c42e65012a836a98e35702 100644 --- a/esp8266/modules/onewire.py +++ b/esp8266/modules/onewire.py @@ -1,6 +1,7 @@ # 1-Wire driver for MicroPython on ESP8266 # MIT license; Copyright (c) 2016 Damien P. George +from micropython import const import _onewire as _ow class OneWireError(Exception): diff --git a/stmhal/boards/STM32F4DISC/staccel.py b/stmhal/boards/STM32F4DISC/staccel.py index 7296662caca73680d9423812f20a115452796eee..2f2561d1cb04e02b5f0923fa484eb85625d45be5 100644 --- a/stmhal/boards/STM32F4DISC/staccel.py +++ b/stmhal/boards/STM32F4DISC/staccel.py @@ -14,6 +14,7 @@ See: STM32Cube_FW_F4_V1.1.0/Projects/STM32F4-Discovery/Demonstrations/Src/main.c """ +from micropython import const from pyb import Pin from pyb import SPI