def show_message(message, msg_type=None, text_color=None, back_color=None, scroll_speed=None):
 text_color = (text_color or [255, 255, 255])
 back_color = (back_color or [0, 0, 0])
 scroll_speed = (scroll_speed or 0.1)
 color_by_type = {'error': [255, 0, 0], 'warning': [255, 100, 0], 'success': [0, 255, 0], 'info': [0, 0, 255]}
 if (msg_type in color_by_type):
  text_color = color_by_type[msg_type]
 _sensehat.show_message(message, scroll_speed, text_color, back_color)
 return {'message': message}

def show_message ( message , msg_type = None , text_color = None , back_color = None , scroll_speed = None ) : text_color = ( text_color or [ 255 , 255 , 255 ] ) back_color = ( back_color or [ 0 , 0 , 0 ] ) scroll_speed = ( scroll_speed or 0.1 ) color_by_type = { 'error' : [ 255 , 0 , 0 ] , 'warning' : [ 255 , 100 , 0 ] , 'success' : [ 0 , 255 , 0 ] , 'info' : [ 0 , 0 , 255 ] } if ( msg_type in color_by_type ) : text_color = color_by_type [ msg_type ] _sensehat . show_message ( message , scroll_speed , text_color , back_color ) return { 'message' : message }
displays a message on the led matrix .