Beginner Topics Mou...
 
Notifications
Clear all

Beginner Topics Mouth LED Matrix

2 Posts
2 Users
0 Reactions
1,450 Views
(@babysiss)
Active Member
Joined: 6 years ago
Posts: 6
Topic starter  

The QBO mouth is a 5 X 4 led matrix.  I found a website that lets you select the led pattern and it gives you the hexidecimal value.  There are two small issues:

  1. The rows are in reverse order.  So row four of the website is equal to row one of the QBO led matrix. 
  2. The website returns a value something like 000000001b1f0e04 and you will have to replace leading zeros with 0x.  So the website value will be  000000001b1f0e04  and you will have to change it to 0x1b1f0e04.

Both of these issues are minor.  I just thought that I would mention them since this post is for beginners.

https://xantorohara.github.io/led-matrix-editor/

Using the website editor you can select your pattern and use the value returned with QboCmd.py SetMouth function.

 

Here is some sample code so you can play with it:

import time
import serial #handles the serial ports
import QboCmd #holds some commands we can use for Qbo

#set up ports for communicating with servos
port = '/dev/serial0'
ser = serial.Serial(port, baudrate=115200, bytesize = serial.EIGHTBITS, stopbits = serial.STOPBITS_ONE, parity = serial.PARITY_NONE, rtscts = False, dsrdtr =False, timeout = 0)
QBO = QboCmd.Controller(ser)

print("all")
#ALL LEDs value from website 000000001f1f1f1f  remember replace leading zeros with 0x
QBO.SetMouth(0x1f1f1f1f)  
#Pause
time.sleep(1)

print("oval")
#oval value from website 000000000e11110e  remember replace leading zeros with 0x
QBO.SetMouth(0xe11110e)
#Pause
time.sleep(1)

print("smile")
#smile -value from website  00000000110e0000  remember replace leading zeros with 0x
QBO.SetMouth(0x110e0000)
#Pause
time.sleep(1)

print("sad")
#sad value from website  00000000000e1100  remember replace leading zeros with 0x
QBO.SetMouth(0x0e1100)
#Pause
time.sleep(1)

print("serious")
#serious website value 00000000001f1f00  remember replace leading zeros with 0x
QBO.SetMouth(0x1f1f00)
#Pause
time.sleep(1)

print("love")
#love wesite value 000000001b1f0e04  remember replace leading zeros with 0x
QBO.SetMouth(0x1b1f0e04)

 

This topic was modified 6 years ago by BabySiss

   
Quote
(@romeo)
Member
Joined: 6 years ago
Posts: 76
 
I leave attached two programs for the QBO mouth test: one for the syllables and one for the numbers, you can run them from the default QBO directory.

   
ReplyQuote
Share: