I am working on a device that utilises the Myoware Muscle Sensor in combination with the Micro Maestro (6 Channel). I understand how to wire it correctly, as it’s quite straightforward. The problem I am having is that I have never programmed anything before or used a Microcontroller, and as such, I have absolutely no idea how to interpret user manuals for the scripting of either components, nor do the terms “ENDIF, ELSE, etc.” mean anything to me, especially considering there is no explanation for layman terms. Additionally, I am unaware of how to interpret the data from the muscle sensor and what limits may need to be imposed for the data, because the microcontroller and sensor provide no apparent method to view the given signal.
If it is of any relevance, the Myoware Muscle Sensors are connected to Channels 0-1, and when their signal is enough I would like them to cease power to Channels 2-3, if possible.
If there is any additional information required, just let me know and I will do my best to provide.
Thanks in advance.
I would suggest taking the MyoWare Muscle Sensors out of your system for now and just focus on getting a basic understanding of the Maestro’s scripting language. If you have not done so already, I recommend working through the “Example Scripts” section of the Maestro user’s guide. You can copy each script to your Maestro and step through the code one line at a time using the “Step Script” button in the “Script” tab of the Maestro Control Center. When you feel comfortable with the script you are running, you can try changing values or modifying the script with commands listed in the “Command Reference” section to see what you can do with them.
When you are ready to try using the MyoWare sensors, you can connect them to Maestro channels configured as inputs in the “Channel Settings” tab of the Maestro Configuration Utility. Then, you can use the
GET_POSITION command to read the sensors from those channels. Please note that you should adjust the gain potentiometer on the MyoWare sensors so their output only goes up to 5V prior to connecting them. When you use the
GET_POSITION command with an input channel, it will return a number between 0 (when the input is at 0V) and 1023 (when the input is at 5V). Also, you should be able to view the inputs changing in real time under the “Status” tab (although the units there are one quarter of the measured value, so it should be between 0 and 255).
If you have any specific questions about the Maestro’s scripting language or the wording in the user’s guide, I would be glad to help clarify. Additionally, if you try writing your own script for using the MyoWare sensors and run into problems, you can post your code here, and I can help troubleshoot with you.