## ##########################################################
## @title: GrovePi+ startup script with Display
## @author: Milos Viktorovic
## @email: m.viktorovic@tue.nl
## @version: 1.0b [12-12-19]
## ##########################################################
import scripts.display as oled ## thing necessary for the OLED display
from time import sleep
## Modify the code below, by adding your part(s)!!!
import hello_world
hello_world.helloWorld()
print(">>> This could be your code! <<<")
print("Close this window if you want to run your code separately (press Ctrl+C to exit)")
### Display content ###
#initialize the display
display = oled.GroveOledDisplay128x64(bus=1)
i = 0;
while True:
try:
display.set_cursor(0, 0)
display.puts('Hello students! ') ## must not exceed number of places on the screen!
### Here you can display your own values (instead of IOT)!
### DO NOT SET CURSOR AT LINE 6! (leave it to system script for IP address.
display.set_cursor(1, 0)
display.puts(" _ "+''+" ___ "+''+" _____ "+' ')
display.set_cursor(2, 0)
display.puts('| |'+''+'/ \\'+''+'|_ _|'+' ')
display.set_cursor(3, 0)
display.puts("| |"+''+"| | |"+''+" | | "+' ')
display.set_cursor(4, 0)
display.puts("|_|"+''+"\___/"+''+" |_| "+' ')
### Live bar
display.set_cursor(5, 0)
display.puts("===============")
i = (i+1) % 13
display.set_cursor(5, i)
display.puts('>')
except:
print ("Error")
sleep(5)