# How to connect non-grove devices through a grove base shield

**URL:** <https://discuss.pynq.io/t/how-to-connect-non-grove-devices-through-a-grove-base-shield/6648>\
**Category:** Support\
**Created:** [February 14, 2024, 3:19pm UTC](https://discuss.pynq.io/t/how-to-connect-non-grove-devices-through-a-grove-base-shield/6648 "2024-02-14T15:19:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![officialcobalt](https://avatars.discourse-cdn.com/v4/letter/o/5f9b8f/32.png) [@officialcobalt](https://discuss.pynq.io/u/officialcobalt)\
**Post date:** [February 14, 2024, 3:19pm UTC](https://discuss.pynq.io/t/how-to-connect-non-grove-devices-through-a-grove-base-shield/6648/1 "2024-02-14T15:19:58Z")

</div>

Hi, I’m very new to using the pynq board and am just trying to set up some simple projects by following along with some tutorials I found online.

I’m using a pyng z2 board image version [v3.0.1]  
I have a Grove base shield v2 connected to the Arduino pins

currently, I’m trying to control a grove LEDbar (v2.1) based on distances calculated using a HC-sr04 ultrasound device.

I have the LEDbar connected to port D6 of the base shield and the ultrasound device connected to Arduino pins 3 and 2 also through the base shield.

I can control each device separately perfectly fine but when I upload the libraries to control both at once one device stops functioning.

this is the code I’m using

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  
import time  
from pynq.overlays.base import BaseOverlay

//led bar control  
from pynq\_peripherals import ArduinoSEEEDGroveAdapter

//ultrasound sensor control  
from pynq.lib.arduino import arduino\_io  
from pynq.lib.arduino import Arduino\_Analog

from time import sleep

base = BaseOverlay(“base.bit”)

adapter=ArduinoSEEEDGroveAdapter(base.ARDUINO, D6=‘grove\_ledbar’)

ledbar = adapter.D6

trig = arduino\_io.Arduino\_IO(base.iop\_arduino.mb\_info, 3, ‘out’)  
echo = arduino\_io.Arduino\_IO(base.iop\_arduino.mb\_info, 2, ‘in’)  
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I was just hoping someone could help me understand why it’s breaking at this stage and how I might go about fixing it, for example, is the a way to write/ read directly to the pins of a base shield port eg pins D3, D2 of port D2?

thank you in advance and apologize if it’s an overly simplistic question I’ve found it hard to find many comprehensive guides on using the pynq board online.
