I’m making a project where I need to be able to use voice commands to control a stepper motor. I have the Amazon Alexa sdk installed and operating on my matrix voice and raspberry pi 3 model b. If anyone can guide me through how to setup the matrix voice to control a stepper motor with Amazon Alexa please let me know.
Others users have had the same question on how to add “specific commands” the Alexa demo. This demo uses the public AVS device SDK. You will have to go a bit deeper into the SDK mechanisms to add this. I personally haven’t tried that yet but I think could be done using what they call Capabilities. This SDK is written in C++ so you have to be confortable with it.
On another option, personally, I think the Google Assistant demo is easier to extend using “Actions”, see here an example from Google. (Google Assistant is written in python)
OK Great, I have been wanting to test the Google Actions with MATRIX Voice/Creator for something simple (change the Everloop colors and dimming) … but I haven’t yet . So please share you progress if possible :).
the easiest way it think is to write your own alexa skill. i have written own alexa skills with flask-ask (python). it just took me about 15 minutes to write my skill to control my tv with cec. there are plenty of tutorials out there:
you solution could be something like this.
alexa skill (e.g. flask-ask) <--- mqtt ---> voice esp32 (gpio) written in c or micropython
I’m currently working to activate the esp32 (gpio) on my matrix voice. Is micropython similar to python? I’m wanting to write a program that when triggered by various voice commands will turn a motor on for various set amounts of time then turn it off.
So I have the Matrix Voice with ESP32 Microcontroller. Do I need to do any setup to use the FPGA as GPIO Pins? To be more clear, do the GPIO pins of the Raspberry Pi the plug into the Matrix Voice just become GPIO pins on the expansion GPIO of the Matrix voice? And if so, can I address the GPIO pins in a python program as FPGA G1 instead of say GPIO 26? I am still trying to setup the esp32 but am having some issues.
The 40 pin GPIO Raspberry Pi connector was not designed for other use other than the Rasp Pi communication with the board. You should use the external 24 GPIO pins connector in the Top of the MATRIX Voice.
Okay, I do understand that. So are the 24 GPIO connections on top of the Matrix Voice usable just as the GPIO pins of the Raspberry Pi are? Or is there a seperate setup process I have to do in order to use the 24 GPIO pins? I’m looking to use them in a python program so I was curious how I would specify the GPIO pin in the program at setup.
For example the pins using the RPi.GPIO library for the raspberry Pi looks like this:
DIR = 20 # Direction GPIO Pin
STEP = 21 # Step GPIO Pin
Is there a library I can import or something similair to interface with the GPIO pins of the Matrix voice just the same?
ok i have updated my voice if you do the following and have the matrix kernel modules installed, there are some gpios usable:
pi@matrix1:~ $ sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-53, parent: platform/3f200000.gpio, pinctrl-bcm2835:
gpio-18 ( |sysfs ) out hi
gpio-24 ( |sysfs ) out hi
gpio-25 ( |sysfs ) out hi
gpio-26 ( |sysfs ) out hi
gpiochip2: GPIOs 100-101, brcmvirt-gpio, can sleep:
gpio-100 ( |led0 ) out hi
gpiochip1: GPIOs 128-135, brcmexp-gpio, can sleep:
gpio-135 ( |led1 ) in hi
gpiochip3: GPIOs 496-511, parent: spi/spi0.0, matrixio-gpio, can sleep:
GPIOs 0-53: are the default RPI GPIOs
the voice gpios should be from 496-511 (matrixio-gpio) so by default they should be usable from the standard python rpio gpio lib (RPi.GPIO). but i’m not sure, if the lib allows to address other then the RPI default gpios. i’ll check if my python matrix lib supports the voice gpios. just let me hook up my logic analyzer and run some tests.
Interesting, so you’re saying there’s no way to actually use those GPIO’s on top of the matrix voice? What about those GPIO’s that are part of the ESP32? All I need for my project is 2 of the GPIO pins, 3.3v, and ground. Then from there program it, preferably using python or a variant of it to send signals from those GPIO pins. I’m going to work more on this on Thursday to see if I can make some progress.