# Python on IoT Redboard error

**URL:** <https://community.sparkfun.com/t/python-on-iot-redboard-error/67392>\
**Category:** SparkFun Inventor's Kit\
**Created:** [November 20, 2025, 2:22am UTC](https://community.sparkfun.com/t/python-on-iot-redboard-error/67392 "2025-11-20T02:22:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![imagiro1](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/imagiro1/32/11396_2.png) [@imagiro1](https://community.sparkfun.com/u/imagiro1)\
**Post date:** [November 20, 2025, 2:22am UTC](https://community.sparkfun.com/t/python-on-iot-redboard-error/67392/1 "2025-11-20T02:22:51Z")

</div>

Hello. I’m running through the [Jupyter Notebook Example 1B - Potentiometer](https://notebooks.sparkfun.com/notebooks?path=1B+-+Potentiometer.ipynb). Example 1A went fine. I get an error running the following code:

```auto
potentiometer = ADC(Pin.board.A0)

```

Error:

```auto
Traceback (most recent call last):
e "<stdin>", line 3, in <module>
AttributeError: type object 'board' has no attribute 'A0'

```

Any ideas?

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [November 20, 2025, 3:52am UTC](https://community.sparkfun.com/t/python-on-iot-redboard-error/67392/2 "2025-11-20T03:52:59Z")

</div>

Did you happen to skip one of the cells? I’d guess the ‘import Pin’ was missed. You can reset and then click the button to run all of the code cells in order

---

<div class="post-metadata">

**Author:** ![imagiro1](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/imagiro1/32/11396_2.png) [@imagiro1](https://community.sparkfun.com/u/imagiro1)\
**Post date:** [November 20, 2025, 4:41pm UTC](https://community.sparkfun.com/t/python-on-iot-redboard-error/67392/3 "2025-11-20T16:41:31Z")

</div>

Thanks for the response. No cells were skipped. RP2350 was reset. Webpage was refreshed and reconnected to the RP2350. I’ve created a new notebook with just the following lines. Same error as above.

```auto
from machine import Pin
from machine import ADC 

led_pin = Pin(34, Pin.OUT)
potentiometer = ADC(Pin.board.A0)

```

Additionally, does Sparkfun have documentation for Micropython?

---

<div class="post-metadata">

**Author:** ![imagiro1](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/imagiro1/32/11396_2.png) [@imagiro1](https://community.sparkfun.com/u/imagiro1)\
**Post date:** [November 20, 2025, 6:33pm UTC](https://community.sparkfun.com/t/python-on-iot-redboard-error/67392/4 "2025-11-20T18:33:40Z")

</div>

I’ve figured out, but I’m wondering if the examples are wrong or I need newer FW or something else is happening.

I found [Sparkfun’s Micropython help.c for RP2](https://github.com/sparkfun/micropython/blob/master/ports/rp2/help.c) documentation which led me to modify the code below. Seems like there is no need to provide `Pin.boad.A0` like the example shows. Per the documentation, you can simply define the ADC Pin using a numeric value. See updated example below.

```auto
from machine import Pin 
from machine import ADC 

led_pin = Pin(34, Pin.OUT) 
potentiometer = ADC(0) 

```

Reading the potentiometer, I get a value from about 0 to 65535 with values changing as I change the pot. Again, still confused if the documentation needs to be updated or there’s something else on my end (FW update?) that needs to occur.

---

<div class="post-metadata">

**Author:** ![sfe\_mac](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sfe\_mac](https://community.sparkfun.com/u/sfe_mac)\
**Post date:** [November 25, 2025, 7:51pm UTC](https://community.sparkfun.com/t/python-on-iot-redboard-error/67392/5 "2025-11-25T19:51:59Z")

</div>

Are you using an older IoT RedBoard RP2350 that did not come with the MicroPython SIK kit? The firmware that ships on the boards we are including in the MicroPython SIK should contain the proper definition for Pin.board.A0. If you are using a board that you already had and are repurposing it for use with the SIK, try flashing it with the linked firmware and it should hopefully clear up your errors: [https://github.com/sparkfun/micropython/releases/download/v1.26.0-preview-beta02/SIK\_MICROPYTHON\_IOTREDBOARD\_RP2350.uf2](https://github.com/sparkfun/micropython/releases/download/v1.26.0-preview-beta02/SIK_MICROPYTHON_IOTREDBOARD_RP2350.uf2)
