# Interfacing balena edge devices with AdafruitIO

**URL:** <https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837>\
**Category:** Discussions\
**Created:** [January 6, 2022, 6:10pm UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837 "2022-01-06T18:10:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewnhem](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/andrewnhem/32/4284_2.png) [@andrewnhem](https://forums.balena.io/u/andrewnhem)\
**Post date:** [January 6, 2022, 6:10pm UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837/1 "2022-01-06T18:10:19Z")

</div>

Please use the thread below to discuss the related blog post:

> **[Interfacing balena edge devices with AdafruitIO](https://www.balena.io/blog/interfacing-balena-edge-devices-with-adafruitio)**
>
> Use this guide to learn how to use AdafruitIO to interface with balena devices. Start with a basic LED controller and level up to your next big idea.

---

<div class="post-metadata">

**Author:** ![YouGenerateCIC](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@YouGenerateCIC](https://forums.balena.io/u/YouGenerateCIC)\
**Post date:** [February 7, 2022, 11:47pm UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837/2 "2022-02-07T23:47:30Z")

</div>

Hi Andrew, thanks for posting your project. I am developing a project using the Adafruit SCD-30, SGP30 using the SparkFun Qwiic SHIM, for temp, humidity and Co2 sensing.

Do you think your dockerfile with…

```auto
FROM balenalib/%%BALENA_MACHINE_NAME%%-debian-python:3.9-bookworm as builder

RUN install_packages build-essential \
    python3-dev \
    python3-rpi.gpio

RUN python3 -m pip install --upgrade setuptools \
                                     adafruit-io \
                                     adafruit-circuitpython-neopixel \
                                     rpi_ws281x 

```

…would be enough to get them running? I am wanting to deploy them along with the Browser block and a touch screen to give a full environmental monitor.

---

<div class="post-metadata">

**Author:** ![andrewnhem](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/andrewnhem/32/4284_2.png) [@andrewnhem](https://forums.balena.io/u/andrewnhem)\
**Post date:** [February 14, 2022, 6:19pm UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837/3 "2022-02-14T18:19:48Z")

</div>

**Hello @YouGenerateCIC ,**

Thanks for checking the project out. I’m going to give a shout to @iayanpahwa , the project creator, to weigh in on your question. Hang tight as he’s out for today but will be back tomorrow.

---

<div class="post-metadata">

**Author:** ![iayanpahwa](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/iayanpahwa/32/6950_2.png) [@iayanpahwa](https://forums.balena.io/u/iayanpahwa)\
**Post date:** [February 15, 2022, 10:53am UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837/4 "2022-02-15T10:53:44Z")

</div>

Hi @YouGenerateCIC , I think you’ll also need to install python drivers for the modules `scd30` using `pip3 install adafruit-circuitpython-scd30` and for `sgp30` using `pip3 install adafruit-circuitpython-sgp30` .

You docker file should look like:

```auto
ROM balenalib/%%BALENA_MACHINE_NAME%%-debian-python:3.9-bookworm as builder

RUN install_packages build-essential \
    python3-dev \
    python3-rpi.gpio

RUN python3 -m pip install --upgrade setuptools \
                                     adafruit-io \
                                     adafruit-circuitpython-neopixel \
                                     rpi_ws281x \
                                    adafruit-circuitpython-scd30 \
                                    adafruit-circuitpython-sgp30

```

Let me know if this works 🙂

---

<div class="post-metadata">

**Author:** ![YouGenerateCIC](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@YouGenerateCIC](https://forums.balena.io/u/YouGenerateCIC)\
**Post date:** [February 28, 2022, 1:48am UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837/5 "2022-02-28T01:48:57Z")

</div>

Thanks @iayanpahwa for your help. Unfortunately I am still getting back:

> 28.02.22 01:33:25 (+0000) sensor Device at 0x61 not in known supported drivers.

I did test with your suggested changes to the docker file but with no luck.

To make sure I could get something working I tried to follow the sensor block setup and got the bme680 working as below.

> 28.02.22 01:33:25 (+0000) sensor Loading device bme680-i2c (chip ID 97) on address 0x77.

My current sensor Dockerfile is

```auto
FROM balenablocks/sensor

WORKDIR /usr/src/app

COPY start.sh start.sh

CMD ["bash", "start.sh"]

```

Should I be able to copy in the RUN commands into the sensor block docker file as above to get the correct drivers?

e.g.

```auto
FROM balenablocks/sensor

ROM balenalib/%%BALENA_MACHINE_NAME%%-debian-python:3.9-bookworm as builder

RUN install_packages build-essential \
    python3-dev \
    python3-rpi.gpio

RUN python3 -m pip install --upgrade setuptools \
                                     adafruit-io \
                                     adafruit-circuitpython-neopixel \
                                     rpi_ws281x \
                                    adafruit-circuitpython-scd30 \
                                    adafruit-circuitpython-sgp30

WORKDIR /usr/src/app

COPY start.sh start.sh

CMD ["bash", "start.sh"]

```

Thanks

---

<div class="post-metadata">

**Author:** ![iayanpahwa](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/iayanpahwa/32/6950_2.png) [@iayanpahwa](https://forums.balena.io/u/iayanpahwa)\
**Post date:** [February 28, 2022, 3:41pm UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837/6 "2022-02-28T15:41:50Z")

</div>

Hi @YouGenerateCIC , happy to know you were able to test with sensor-block and rule out the possibility of non-functional sensor module. As far as the dockerfile is concerned, you can only use one base image, feel free to take ideas from dockerfile of sensor block and try to create one with your packages but I won’t recommend modifying it right away as it uses custom start scripts which is not recommended to change for proper functionality.

---

<div class="post-metadata">

**Author:** ![YouGenerateCIC](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@YouGenerateCIC](https://forums.balena.io/u/YouGenerateCIC)\
**Post date:** [March 1, 2022, 12:22am UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837/7 "2022-03-01T00:22:56Z")

</div>

Thanks how can I find someone to do this for me?

---

<div class="post-metadata">

**Author:** ![iayanpahwa](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/iayanpahwa/32/6950_2.png) [@iayanpahwa](https://forums.balena.io/u/iayanpahwa)\
**Post date:** [March 9, 2022, 6:52am UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837/8 "2022-03-09T06:52:41Z")

</div>

@YouGenerateCIC I’m not sure where you could find someone to do this for you but if you give it a shot I’m happy to help you through, working with docker is mostly a back and forth process, though I can recommend you try `local mode` and `live push` details [here](https://www.balena.io/blog/local-mode-and-livepush-make-balenacloud-development-powerfully-fast/) to speed up your development workflow 😃

---

<div class="post-metadata">

**Author:** ![YouGenerateCIC](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@YouGenerateCIC](https://forums.balena.io/u/YouGenerateCIC)\
**Post date:** [March 14, 2022, 2:19pm UTC](https://forums.balena.io/t/interfacing-balena-edge-devices-with-adafruitio/350837/10 "2022-03-14T14:19:13Z")

</div>

Thanks @iayanpahwa learning fast!
