Asked — Edited

Can Someone Help Me With The Development Of A ARC Skill?

Can someone help me with the development of a ARC skill?  I have put together a Arduino script that is for an ESP32 it contains the EZB firmware and it also has a very robust MPU6050 logic.  I need to have the skill in ARC be able to allow some options to be set and also bring MPU data back in variables.  Like I said I have all the logic I just need help making the UI for ARC.

If you are willing to help let me know and I will send you the code.


ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

#41  

Also, the MPU 6050. Thank you very much.

#42   — Edited

Redzone,  this is the link for the board I am using Link

Here is the link to the MPU6050 Link

User-inserted image

#43  

Thank you for the links @smiller29 and thank you for all the work you’ve done on this skill!

#44  

You are very welcome it has been a real learning process and without the help of DJ I would not been able to get this done.

Author Avatar
PRO
Synthiam
#45  

You’re a pro! Now that you know how it’s done, think of all the possibilities:)

#46  

Thanks DJ and yes I am already thinking about other skills but I still have lots to learn.

#47  

OK DJ I need your help again with this skill it currently only works in the Connection Manager 0 position and that is based on the following section of code:

void readValues()
    {
        try
        {

            var response = EZBManager.EZBs[0].SendCommandData(12, 0x00);

            Int16 AngleZ = BitConverter.ToInt16(response, 0);
            Int16 AngleY = BitConverter.ToInt16(response, 2);
            Int16 AngleX = BitConverter.ToInt16(response, 4);
            UInt16 servoRvalue = BitConverter.ToUInt16(response, 6);
            UInt16 servoPvalue = BitConverter.ToUInt16(response, 8);
            UInt16 servoYvalue = BitConverter.ToUInt16(response, 10);

            ARC.Scripting.VariableManager.SetVariable("$AngleZ", AngleZ);
            ARC.Scripting.VariableManager.SetVariable("$AngleY", AngleY);
            ARC.Scripting.VariableManager.SetVariable("$AngleX", AngleX);
            ARC.Scripting.VariableManager.SetVariable("$servoRvalue", servoRvalue);
            ARC.Scripting.VariableManager.SetVariable("$servoPvalue", servoPvalue);
            ARC.Scripting.VariableManager.SetVariable("$servoYvalue", servoYvalue);

            if (Invokers.GetCheckedValue(cbDebug))
                Invokers.SetAppendText(textBox1, true, "AngleZ: {0}, AngleY: {1}, AngelX: {2}, Yaw: {3}, Pitch: {4}, Roll: {5}", AngleZ, AngleY, AngleX, servoYvalue, servoPvalue, servoRvalue);
            }
            catch (Exception ex)
            {
               Invokers.SetAppendText(textBox1, true, ex.ToString());
        }

I am only trying to use position 0 "var response = EZBManager.EZBs[0].SendCommandData(12, 0x00);" is there a way to make this dynamic to use any port in the connection manager?  if so can you please provide a sample of how to do it.

Thanks in advance.

Author Avatar
PRO
Synthiam
#48  

You need sone drop-down or configuration setting to select an index for the ezb

Pass that int as an index for the ezb

ezb[someIndexVaruable].sendCommand