Hc-sr04 witz grove connector and seeeduino v4.2?

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, jeremy882, crail.lyu969

Post Reply
om_trop_fort
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Wed May 08, 2019 3:26 am

Hc-sr04 witz grove connector and seeeduino v4.2?

Post by om_trop_fort » Wed May 08, 2019 3:36 am

Hi

All in the title. Is it possible to plug and use an ultrasonic sensor HC-SR04 with grove connector and a seeeduino. This broad has 3 grove connector. Or do I use a grove shield ?

So? Thanks!
Vince

bill.yu
Junior-6
Junior-6
Posts: 638
Joined: Mon Apr 02, 2018 11:05 am

Re: Hc-sr04 witz grove connector and seeeduino v4.2?

Post by bill.yu » Wed May 08, 2019 10:56 am

Hi Vince

You can use the I2C port, they are A4/A5. The analog pins can be used identically to the digital pins, using the aliases A0 (for analog input 0), A1, etc. For example, the code would look like this to set analog pin 0 to an output, and to set it HIGH:

pinMode(A0, OUTPUT);
digitalWrite(A0, HIGH);

you can use the https://www.seeedstudio.com/Grove-4-pin ... -PAck.html to transform grove port to 2.54 pin connectors. then you can connect to gnd/vcc/trig/echo. thanks.

Post Reply