Module not found error

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Jmiramo22
 
Posts: 2
Joined: Wed Dec 01, 2021 3:03 pm

Module not found error

Post by Jmiramo22 »

I am trying to get this python code to run on Beaglebone Black, the code is trying to get the temperature from a sensor and display it on a 7-segment LED backpack, here is the code:

Code: Select all

import Adafruit_BBIO.ADC
import time
import datetime
from Adafruit_7Segment import SevenSegment

segment = SevenSegment(address=0x70)
sensor_pin = 'P9_40'


ADC.Setup()

While(True);
reading = ADC.read(sensor_pin)
millivolts = reading * 1800
temp_c = (millivolts - 500) / 10

segment.WriteDigit(0,int(temp_c / 10))
segment.WriteDigit(1,int(temp_c % 10))
segment.WriteDigit(3,12)

segment.setColon(1)
time.sleep(1)
// I am getting an error saying that "Adafruit_7Segment" module doesn't exist.
Attachments
Screenshot 2021-12-01 131157.png
Screenshot 2021-12-01 131157.png (78.16 KiB) Viewed 126 times

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Module not found error

Post by dastels »

Are you using Blinka and have installed the SevenSegment library? For something similar see https://learn.adafruit.com/circuitpytho ... rypi-linux.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”