Quantcast
Channel: Support - Pimoroni Buccaneers
Viewing all articles
Browse latest Browse all 6929

ScrollPhat HD query

$
0
0

@Richard238 wrote:

This code prints the temp (from envirophat) to the terminal every second.
ScrollPhatHD scrolls only very slowly.

I’m not sure where the scrollphat.clear needs to go, or how to control the scroll speed as it’s much slower than what’s being printed on the terminal.

All help, much appreciated.
Thank you.

import time
import sys
from envirophat import light, weather, motion, analog, leds
import scrollphathd

try:
    while True:
        temperature = weather.temperature()
	temp = " The temp is " + str(weather.temperature())
	

	print str(temp)
	
        scrollphathd.write_string(
        temp, 
        brightness=0.1
        )

#! Show the buffer
	scrollphathd.show()	
#! Scroll the buffer content
	scrollphathd.scroll()

# Where does .clear go?!	        
#  	scrollphathd.clear()

# Why does terminal print every second, but phat is much slower?
        time.sleep(1)
        

except KeyboardInterrupt:
    pass

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6929

Trending Articles