Search found 2 matches

by terencebeh
Mon Jun 03, 2019 4:28 pm
Forum: micro:bit boards
Topic: UART MP3 VOICE MODULE
Replies: 2
Views: 3596

Re: UART MP3 VOICE MODULE

Do you mean below? Sorry I am quite new to Microphython.

Code: Select all

from microbit import *
def play(track):
    buffer = b'\xaa\x07\x02\x00' + bytes([track, track + 0xb3])
    uart.write(buffer)
    
    
uart.init(baudrate=9600, bits=8, parity=None, stop=1, tx=pin12, rx=pin16)
play(1)
by terencebeh
Sun Jun 02, 2019 1:52 pm
Forum: micro:bit boards
Topic: UART MP3 VOICE MODULE
Replies: 2
Views: 3596

UART MP3 VOICE MODULE

I am trying to code in Micropython for Microbit with Gravity UART MP3 Voice Module [url]https://wiki.dfrobot.com/Voice_Module_SKU__DFR0534#target_5[/url] [code] from microbit import * uart.init(baudrate=9600, bits=8, parity=None, stop=1, tx=pin12, rx=pin16) buffer = {0xAA, 0x02, 0x00, 0xAC} uart.wri...