-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: No module named gaugette.ssd1306 #9
Comments
I am having the same issue. if you could please direct us towards a solution it would be great. thanks |
Read the README file onece again and execute the setup OLED... https://github.com/HackerShackOfficial/Smart-Bartender/blob/master/README.md#oled-setup |
I did everything as well but same issue |
I am also having the same issue |
hi to all! first of all i hope everybody can apologize me for my englis, second i hope samebody can halp me. i've make, mounted ed connected all bartender hardware, box, raspberry pi zero HW, trasf, DC-DC regulator, relays, tubes, pirostatic pump, diode and tubes, display and button... all ok, switched on and nothing was explosed!!!! so i think good :-). for OLED dispaly, i've used : and used this connections: so all the hardware explaned. software, (bigggg problems... for me...) First configuration in raspi-config for I2C, SPI and GPIO, WIFI and SSH for shell remote controll. python -V : Python 2.7.16 "sudo apt install python-pip" : "sudo pip install unicornhat" : "Enable SPI" : "I2C" : "OLED Setup" : git clone https://github.com/HackerShackOfficial/Smart-Bartender "sh OLEDinstall.sh" "sudo apt-get install git-core" "sudo nano /etc/modprobe.d/raspi-blacklist.conf" "sudo nano /etc/modules" "sudo reboot" "git clone https://github.com/the-raspberry-pi-guy/OLED" "cd OLED" "sh OLEDinstall.sh" Running the Code: "sudo pip install -r requirements.txt" "sudo python bartender.py" so.. i went on internet about this error : https://forums.adafruit.com/viewtopic.php?f=47&t=76458 and i've used this code: "sudo apt-get update" "sudo apt-get install build-essential python-dev python-pip" "sudo pip install spidev" i don't know what i need to do more... this project it was like very simple, bat i'm too stupid... Demetrio. |
Hi! I'm having the same issue on the gaugette.ssd1306 module which cannot be found. Any solutions yet? |
Exact same issue. I cannot rabbit hole deep enough to find out why 'ImportError: No module named gaugette.ssd1306' keeps popping up. HELP!!! |
did anyone get the solution for "no module named gaugette.ssd1306" |
Nope, and it’s a shame that the owners of this project are not responding at all, despite the fact we pay them a monthly fee on patreon to support more of these projects….. |
Did anyone try to download the gaugette folder from here https://github.com/guyc/py-gaugette/tree/master/gaugette and just put it into the bartender folder? Did not try it as I used another lib for my display. But might work. |
@rinks1020 @derelvis @willchickering @RobbieBakker @festermax @ddejesu @dexterch @jbiams77 @xelamod @Joe2824 Hi guys, is there anyone who is still struggling with this issue? I made a complete rewrite from what HackerShack initially wrote back in 2017. I am using the newest libraries right now with support from raspberry pi 3 to the newest version 4. Let me know in a reply if you're interested in this. Best Regards, |
Hi Kevin, |
|
I got ya. I will upload my code changes to github next week. Will stay in touch. |
Thanks Kevin, |
@kevinvugts - Hi there, appreciate you may not have had a lot of time. Would you be able to upload your code / instructions sometime? Really stuck and need a shove in the right direction. |
I got this error (see pic) |
I find the selution in https://how2electronics.com/interfacing-ssd1306-oled-display-with-raspberry-pi-pico/ Copy the following code to your editor, Save the code as "ssd1306.py" to your hardware # MicroPython SSD1306 OLED driver, I2C and SPI interfaces
from micropython import const
import framebuf
# register definitions
SET_CONTRAST = const(0x81)
SET_ENTIRE_ON = const(0xA4)
SET_NORM_INV = const(0xA6)
SET_DISP = const(0xAE)
SET_MEM_ADDR = const(0x20)
SET_COL_ADDR = const(0x21)
SET_PAGE_ADDR = const(0x22)
SET_DISP_START_LINE = const(0x40)
SET_SEG_REMAP = const(0xA0)
SET_MUX_RATIO = const(0xA8)
SET_COM_OUT_DIR = const(0xC0)
SET_DISP_OFFSET = const(0xD3)
SET_COM_PIN_CFG = const(0xDA)
SET_DISP_CLK_DIV = const(0xD5)
SET_PRECHARGE = const(0xD9)
SET_VCOM_DESEL = const(0xDB)
SET_CHARGE_PUMP = const(0x8D)
# Subclassing FrameBuffer provides support for graphics primitives
# http://docs.micropython.org/en/latest/pyboard/library/framebuf.html
class SSD1306(framebuf.FrameBuffer):
def __init__(self, width, height, external_vcc):
self.width = width
self.height = height
self.external_vcc = external_vcc
self.pages = self.height // 8
self.buffer = bytearray(self.pages * self.width)
super().__init__(self.buffer, self.width, self.height, framebuf.MONO_VLSB)
self.init_display()
def init_display(self):
for cmd in (
SET_DISP | 0x00, # off
# address setting
SET_MEM_ADDR,
0x00, # horizontal
# resolution and layout
SET_DISP_START_LINE | 0x00,
SET_SEG_REMAP | 0x01, # column addr 127 mapped to SEG0
SET_MUX_RATIO,
self.height - 1,
SET_COM_OUT_DIR | 0x08, # scan from COM[N] to COM0
SET_DISP_OFFSET,
0x00,
SET_COM_PIN_CFG,
0x02 if self.width > 2 * self.height else 0x12,
# timing and driving scheme
SET_DISP_CLK_DIV,
0x80,
SET_PRECHARGE,
0x22 if self.external_vcc else 0xF1,
SET_VCOM_DESEL,
0x30, # 0.83*Vcc
# display
SET_CONTRAST,
0xFF, # maximum
SET_ENTIRE_ON, # output follows RAM contents
SET_NORM_INV, # not inverted
# charge pump
SET_CHARGE_PUMP,
0x10 if self.external_vcc else 0x14,
SET_DISP | 0x01,
): # on
self.write_cmd(cmd)
self.fill(0)
self.show()
def poweroff(self):
self.write_cmd(SET_DISP | 0x00)
def poweron(self):
self.write_cmd(SET_DISP | 0x01)
def contrast(self, contrast):
self.write_cmd(SET_CONTRAST)
self.write_cmd(contrast)
def invert(self, invert):
self.write_cmd(SET_NORM_INV | (invert & 1))
def show(self):
x0 = 0
x1 = self.width - 1
if self.width == 64:
# displays with width of 64 pixels are shifted by 32
x0 += 32
x1 += 32
self.write_cmd(SET_COL_ADDR)
self.write_cmd(x0)
self.write_cmd(x1)
self.write_cmd(SET_PAGE_ADDR)
self.write_cmd(0)
self.write_cmd(self.pages - 1)
self.write_data(self.buffer)
class SSD1306_I2C(SSD1306):
def __init__(self, width, height, i2c, addr=0x3C, external_vcc=False):
self.i2c = i2c
self.addr = addr
self.temp = bytearray(2)
self.write_list = [b"\x40", None] # Co=0, D/C#=1
super().__init__(width, height, external_vcc)
def write_cmd(self, cmd):
self.temp[0] = 0x80 # Co=1, D/C#=0
self.temp[1] = cmd
self.i2c.writeto(self.addr, self.temp)
def write_data(self, buf):
self.write_list[1] = buf
self.i2c.writevto(self.addr, self.write_list)
class SSD1306_SPI(SSD1306):
def __init__(self, width, height, spi, dc, res, cs, external_vcc=False):
self.rate = 10 * 1024 * 1024
dc.init(dc.OUT, value=0)
res.init(res.OUT, value=0)
cs.init(cs.OUT, value=1)
self.spi = spi
self.dc = dc
self.res = res
self.cs = cs
import time
self.res(1)
time.sleep_ms(1)
self.res(0)
time.sleep_ms(10)
self.res(1)
super().__init__(width, height, external_vcc)
def write_cmd(self, cmd):
self.spi.init(baudrate=self.rate, polarity=0, phase=0)
self.cs(1)
self.dc(0)
self.cs(0)
self.spi.write(bytearray([cmd]))
self.cs(1)
def write_data(self, buf):
self.spi.init(baudrate=self.rate, polarity=0, phase=0)
self.cs(1)
self.dc(1)
self.cs(0)
self.spi.write(buf)
self.cs(1) Trust me, It's worked!! |
Hi, I feel sorry I haven't got back to this. I will get back to you a.s.a.p. In the mean time, did you make any progress? Best Regards, |
@kevinvugts |
@kevinvugts I write a blog for your to flash your pico, check it out~ 1. Thonny installationPlease go to [Thonny Official Website]( https://thonny.org/ )to finish downloading **Please refer to * *: [Thonny Installation Tutorial - From_SCDN]( https://blog.csdn.net/qq_29523945/article/details/122757970 ) 2. Installation of Raspberry Pie Pico MicroPython
3. Congratulations on completing your first Flash job. Try the lighting program!from machine import Pin
#The above sentence is to find all the pins in the raspberry pie bag
led=Pin(25,Pin.OUT)
#Control the element (LED) light of the 25 port as an output component
# Pin. OUT is used for output and Pin. IN is used for input
while True:
Led. value (1) # Give LED a high level
Print ("useful baa, useful baa~") |
No need for a blog post for me. I finished this project ages ago with my own code. |
Hello,
I'm a beginner with all of this and installed everything cording to the instructions but i'm getting the following error:
Traceback (most recent call last):
File "bartender.py", line 1, in
import gaugette.ssd1306
ImportError: No module named gaugette.ssd1306
what did I missed?
thanks!
The text was updated successfully, but these errors were encountered: