Asked — Edited

4 Pin Ultrasonic Sensor Iotiny

Hello can you use a 4 pin ultrasonic  sensor, like the SR-04, with the iotiny and if so how would it wire up?

I'm guessing it would use 2 digital ports on the iotiny.

Thank you



Related Hardware (view all EZB hardware)
EZ-B Iotiny by EZ-Robot
Control IoTiny with Synthiam ARC: 100MHz Cortex‑M4 Wi‑Fi IoT/robot controller-camera, servos, ADC, I2C and digital I/O for easy internet automation
Wi-Fi / USB
Servos 8
Camera
Audio
UART
I2C
ADC
Digital

Related Robot Skills (view all robot skills)
Displays HC-SR04 ultrasonic distance readings in ARC; scriptable via GetPing(), pausable, sets a variable with multiplier, optional NMS output
Read Digital by Synthiam
Read TTL digital input from an ARC I/O port; real-time red/green status for low (0V) or high (+3.3/5V), selectable board/port and read interval.
Set Digital by Synthiam
Toggle a digital I/O port between TTL low (0V) and high (3.3V/5V) in ARC; select board and port, simple on/off control-signal only.

ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

Author Avatar
PRO
Canada
#1  

Yes, you can use a 4-pin ultrasonic sensor like the HC-SR04 with the EZ-B IoTiny. The HC-SR04 typically has four pins: VCC, Trig (Trigger), Echo, and GND (Ground). Here's how you would wire it up to the IoTiny:

  1. VCC (Power): Connect this to one of the power pins on the IoTiny that provides the appropriate voltage for your sensor (typically 5V).

  2. Trig (Trigger): Connect this to one of the digital output ports on the IoTiny. This port will be used to send the pulse to initiate the sensor's ultrasonic signal.

  3. Echo: Connect this to a different digital input port on the IoTiny. This port will be used to read the signal returned to the sensor.

  4. GND (Ground): Connect this to one of the ground pins on the IoTiny.

In the ARC software, you will need to configure the Ultrasonic Distance skill with the appropriate trigger and echo ports that you have connected to the HC-SR04 sensor. Set the trigger port to the digital output you've connected to the Trig pin of the sensor, and the echo port to the digital input connected to the Echo pin.

Remember that the IoTiny operates at 3.3V logic levels, but it is typically 5V tolerant on the digital input pins, which means it should work with the HC-SR04 sensor. However, always check the specifications of your particular sensor and the IoTiny to ensure compatibility and to avoid damaging your components.


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.