Just to summarise my issue I've been trying to clear the screen of a text that is displayed on a built in OLED display from my ESP8266EX board. I have uploaded the script to the board that includes the parameters and classes required to make the screen work so that part is fine. My goal is quite simple, I´m trying to load a main.py script that when restarting or powering up the board a text shows for around 3 seconds then is cleared and only a blinking dot remains waiting for any input of the user. However, when I import the 'os' library, call the 'system' module and input the 'cls' command, the terminal returns an error that says that is not defined. Find below my main script and the error output:
from machine import Pin, SoftI2C
import SSD1306Lib
import os
import time
# ESP8266 Pin assignment
i2c = SoftI2C(scl=Pin(14), sda=Pin(12))
# Especification of OLED pixel dimensions and class inheritance
oled_width = 128
oled_height = 64
oled = SSD1306Lib.SSD1306_I2C(oled_width, oled_height, i2c)
oled2 = SSD1306Lib.SSD1306_I2C(oled_width, oled_height, i2c)
oled.text('Hola amigo!', 0, 0)
oled.text('ESP8266EX', 0, 10)
oled.text('Micropython', 0, 20)
oled2.text('.', 0, 30)
oled.show()
time.sleep(3)
os.system('cls')
oled2.show()
And the error output from mpremote running on cmd:
# ESP8266 Pin assignment
i2c = SoftI2C(scl=Pin(14), sda=Pin(12))
# Especification of OLED pixel dimensions and class inheritance
oled_width = 128
oled_height = 64
oled = SSD1306Lib.SSD1306_I2C(oled_width, oled_height, i2c)
oled2 = SSD1306Lib.SSD1306_I2C(oled_width, oled_height, i2c)
oled.text('Hola amigo!', 0, 0)
oled.text('ESP8266EX', 0, 10)
oled.text('Micropython', 0, 20)
oled2.text('.', 0, 30)
oled.show()
time.sleep(3)
os.system('cls')
Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'system'
Tried using different clearing strategies including the click.clear() function but no success. I am beginner at programming and microcontrollers, so I am learning from discussions and trial/error