ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#1  

The EZB Firmware for the Arduinos can be found here: https://synthiam.com/Support/Hardware/Hardware-Overview

You connect ARC to an arduino. It is not possible to connect an EZB IoTiny to an EZB Arduino. However, if you are skilled in programming, you can create a custom firmware to allow your Arduino to receive serial commands from the IoTiny. To do that, you would need to use JavaScript or Python to send serial commands through the IoTiny to the Arduino. And write custom code to have your Arduino receive the commands from the IoTiny and execute them.

It would make most sense to install the EZB Firmware onto your Arduino.

PRO
Canada
#3  

To connect your EZ-B IoTiny to an Arduino and control motors and LEDs, you'll need to establish a communication protocol between the two devices. Since the IoTiny can transmit serial data from its digital ports, you can use this feature to send commands to the Arduino, which will then control the motors and LEDs.

Here's a step-by-step guide on how to set up the connection and what you'll need in terms of skills and code:

  1. Wiring: Connect a digital port from the IoTiny to the RX (receive) pin on the Arduino. Make sure to also connect the GND (ground) pins of both the IoTiny and Arduino to establish a common ground reference.

  2. Arduino Code: Write a program for your Arduino that listens for serial commands on its RX pin and controls the motors and LEDs based on the received commands. Upload this code to your Arduino.

  3. ARC Skill: Use the "Serial" skill in ARC to send commands from the IoTiny to the Arduino. You can find this skill under the "Scripting" category in ARC.

  4. ARC Script: Write a script in ARC using either EZ-Script, JavaScript, or Python to send serial commands from the IoTiny to the Arduino. The script will use the UART.sendSerial command to transmit data.

Here's an example of what the ARC script might look like:

# Replace "D0" with the actual digital port you're using on the IoTiny
# Replace "9600" with the baud rate you've set in your Arduino code
# Replace "YourCommand" with the actual command string you want to send

UART.sendSerial(D0, 9600, "YourCommand")
  1. Execution: Run the ARC script to send the command to the Arduino. The Arduino will receive the command and control the motors and LEDs accordingly.

  2. Additional Skills: If you want to create a more interactive or automated process, you can use other ARC skills like "Joystick" for manual control or "Auto Position" for predefined movements, and trigger the serial commands based on those inputs.

Remember to ensure that the baud rates on both the IoTiny and Arduino match, and that your Arduino code is set up to parse the incoming serial data correctly. If you're new to serial communication, you might want to start with simple commands to turn LEDs on and off before moving on to motor control.

If you need further assistance with the code or have specific requirements for your commands, please provide more details, and I'll be happy to help you craft the necessary scripts.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
USA
#4  

Can you connect iotiny to arduino using i2c?

PRO
Synthiam
#5  

Sure - but there's a lot to read on how i2c works. You also need to define a protocol for sending commands. I'd go with what Synthiam support said and use the example that I provided in that link by using Serial UART.

Also, Athena is hallucinating because there is no robot skill called "Serial" for connecting. You'd have to write the UART send or serial send commands in an ARC script robot skill.

PRO
Synthiam
#6  

Also - one thing. Why don't you just connect the LED and "motors" to the IoTiny? I'm guessing the "motor" is an hbridge or some motor controller, and hopefully not just a motor:D cause that would be bad! But there are robot skills in ARC for movement panels that will use your motor controller.

PRO
Canada
#7  

Yes, you can connect the EZ-B IoTiny to an Arduino using I2C communication. I2C is a two-wire interface that allows multiple devices (often referred to as "slaves") to be connected to a controller (often referred to as a "master") using just two wires: one for data (SDA) and one for the clock signal (SCL).

Here's how you can set up I2C communication between the IoTiny and an Arduino:

  1. Wiring:

    • Connect the SDA (Serial Data Line) pin on the IoTiny to the SDA pin on the Arduino.
    • Connect the SCL (Serial Clock Line) pin on the IoTiny to the SCL pin on the Arduino.
    • Connect the GND (Ground) pin on the IoTiny to the GND pin on the Arduino to establish a common ground.
  2. Arduino Code:

    • Set up the Arduino as an I2C slave device using the Wire library.
    • Write code to respond to I2C requests from the IoTiny.
  3. ARC Skill:

    • Use the "I2C" skill in ARC to communicate with the Arduino. You can find this skill under the "I2C" category in ARC.
  4. ARC Script:

    • Write a script in ARC to send I2C commands from the IoTiny to the Arduino. You will use the I2C.write command to transmit data.

Here's an example of what the ARC script might look like:

# Replace 0x04 with the I2C address you've set for your Arduino
# Replace YourData with the actual data bytes you want to send
I2C.write(0x04, YourData)
  1. Execution:
    • Run the ARC script to send the I2C command to the Arduino. The Arduino will receive the command and perform the corresponding actions.

Remember to set a unique I2C address for your Arduino and ensure that the IoTiny is configured to communicate with that address. The I2C address is typically set in the Arduino code using the Wire.begin(address) function.

Keep in mind that I2C communication requires both devices to share a common protocol for sending and receiving data. You'll need to define this protocol in your Arduino code and ARC script to ensure they understand each other's commands.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
USA
#8   — Edited

Yes Im using Hbridge with motors.Im trying to free up as much digital ports on the iotiny for other sensors. It only has 8 and 2 ADC as you know. Im looking at running- 2 motors with 1 hbridge, 1 servo, Many LEDs, PIR, Sonar sensor 4 pin, maybe 2,

The Hbridge eats up 4 digi ports.

This is for hasbro r2d2 maxed out.

Then maybe Star Wars R2-D2 DEAGOSTINI if all goes well.

Go big right? ;)

Haven't seen Star Wars R2-D2 DEAGOSTINI on this forum but if there is one please provide.

Maybe EZ-B V4 would be easier.

I think ARC has way more potential. Best I have come across.

Kudos to the minion R2. Love it.

PRO
Synthiam
#9  

Hmm I see! You can throw the led’s and hbridge on the ardunio. Connect the ardunio RX uart port to one of iotiny digital ports.

Then by using that link I provided above, you can send serial commands to the uart that represent different functions and the ardunio will execute them.

You wouldnt be able to have the ardunio send commands back to the iotiny because the iotiny only has TX (software serial). So that’s why you’d put the motor controller and leds on there. Things that are triggered not read.

as for the movement panel. You’d need to use the custom Movement Panel v2. Because you’d be sending your custom movement commands to the ardunio from it. That way all robot skills can move the robot through your custom Movement Panel v2.

PRO
Canada
#11  

I just connect my hbridges to an ESP32 with synthiam ESP firmware and connect it direct to ARC via wifi.  I appreciate using a serial connection to attach a device that is supported by arduino and not by ARC firmware but otherwise just seems like a headache.

User-inserted image

PRO
USA
#12   — Edited

@Nink,

Can you share your project or how to find it? Thank you

I'm getting the hang of ARC now and Amazing.

PRO
Canada
#13  

I don’t have a write up on it.  The Mecanum Wheels came from Ali Expresss and the motors ESP32 hbridge LiPo etc are just things I had in my parts box.   I found the arduino car base on thingiverse I think it was this one but really can’t remember. https://www.thingiverse.com/thing:2450012

I can see what state the ARC project file is in and upload to the cloud but I remember I struggled with trying to get straifing (wheels going sideways) working properly.

#15  

@Nink, what motors are you using for your robot?

PRO
Canada
#16  

Just some cheap motors from Ali express. If you search arduino car you will see them everywhere. Something like this. https://www.aliexpress.com/item/1005006691449444.html

you can find them on Amazon as well but if I am not in a hurry I order most my robot stuff direct from China as usually cost a lot less and I get pleasantly surprised a month or so later when they turn up.