Search found 12 matches

by ChasL001
Sun May 23, 2021 8:36 pm
Forum: Raspberry Pi microcontroller boards
Topic: Multiple ByteArrays for Pico OLED Displays
Replies: 10
Views: 6278

Re: Multiple ByteArrays for Pico OLED Displays

I obviously don't understand how these dictionaries work and can't find a guide to explain it to me better. This would be my simple example ... friend = {} friend["best"] = "Sir Lancelot" friend["nice"] = "Lady Guinevere" friend["evil"] = "Mordred" print("My best friend is " + friend["best"]) print...
by ChasL001
Sun May 23, 2021 5:03 pm
Forum: Raspberry Pi microcontroller boards
Topic: Multiple ByteArrays for Pico OLED Displays
Replies: 10
Views: 6278

Re: Multiple ByteArrays for Pico OLED Displays

Thanks again Peter, W3Schools says "Dictionaries are used to store data values in key:value pairs." but I'm not sure how I can make this work for my needs? I need to have 12 variables with names like ONE, TWO THREE... NINE, ZERO, POINT and DEGCEE. I plan to create a display of the temperature on a d...
by ChasL001
Sun May 23, 2021 4:01 pm
Forum: Raspberry Pi microcontroller boards
Topic: Multiple ByteArrays for Pico OLED Displays
Replies: 10
Views: 6278

Re: Multiple ByteArrays for Pico OLED Displays

Thanks for this and I can sort of see how it works but don't understand how the image converter works. The text says to "Create a dictionnary with: width, height and image data" but don't know how to do this. Can you give me a bit more info on how it should be used? Hello, Maybe you can find interre...
by ChasL001
Sun May 23, 2021 8:59 am
Forum: Raspberry Pi microcontroller boards
Topic: Multiple ByteArrays for Pico OLED Displays
Replies: 10
Views: 6278

Multiple ByteArrays for Pico OLED Displays

Hello All, I'm trying to write code to display large graphics on a Pico OLED Display (128 x 128) Adafruit 1.12" Display. I can do this by creating a Byte Array of a graphic and have the numbers ZERO to NINE stored in a text file for quick ref. I can place the byte array into the standard OLED test c...
by ChasL001
Mon Apr 26, 2021 6:14 pm
Forum: Raspberry Pi microcontroller boards
Topic: MicroPython Time Display
Replies: 10
Views: 10721

Re: MicroPython Time Display

All these things are straightforward and are just a matter of learning Python. I suggest you either buy a book on Python or do an online course on your PC. MicroPython is highly compatible with standard Python, at least until you get involved with advanced features of the language. A filename is ju...
by ChasL001
Mon Apr 26, 2021 5:23 pm
Forum: Raspberry Pi microcontroller boards
Topic: MicroPython Time Display
Replies: 10
Views: 10721

Re: MicroPython Time Display

Thanks again Peter, brilliant, I'm learning lots. I use the file = open method as I have the Pico cycling and appending the file: DateForFile = "{}/{}/{} {}:{}\n" file = open('foo.txt', 'w') file.write(DateForFile.format(Dday, Dmonth, Dyear, Dhour, Dmin,)) My next puzzle is formatting the filename w...
by ChasL001
Mon Apr 26, 2021 1:12 pm
Forum: Raspberry Pi microcontroller boards
Topic: MicroPython Time Display
Replies: 10
Views: 10721

Re: MicroPython Time Display

Hi me again, Now writing the data to a file but cannot get the data format to write correctly Tried modifying: print(DdateandTime.format(Dday, Dmonth, Dyear, Dhour, Dmin,)) to this file.write(str(Ddateandtime) + "\n") had to drop the .format(Dday, Dmonth, Dyear, Dhour, Dmin, bit as it just gave FORM...
by ChasL001
Tue Apr 13, 2021 4:08 pm
Forum: Raspberry Pi microcontroller boards
Topic: SSD1322 Oled Display with a Pico?
Replies: 3
Views: 2474

Re: SSD1322 Oled Display with a Pico?

Looking at the SSD1322 data sheet, I2C is not mentioned. It talks about serial SPI, and parallel 8080 and 6800 mode. Gosh darn it, you're right! I made the assumption they were commonly connected for both but the package only talks SPI not I2C. Right, new display SSD 1306 required for the project. ...
by ChasL001
Tue Apr 13, 2021 12:36 pm
Forum: Raspberry Pi microcontroller boards
Topic: SSD1322 Oled Display with a Pico?
Replies: 3
Views: 2474

SSD1322 Oled Display with a Pico?

I have an SSD 1322 OLED display which I have used with a Pi Zero for a model train display of timetables. The display works OK but of course all the programming was done by someone else and I just followed a build guide. I'd like to try and use this display with a PICO using SPI. I followed a great ...
by ChasL001
Mon Apr 12, 2021 12:56 pm
Forum: Raspberry Pi microcontroller boards
Topic: MicroPython Time Display
Replies: 10
Views: 10721

Re: MicroPython Time Display

pythoncoder wrote:
Wed Apr 07, 2021 4:14 pm
You might prefer this format string

Code: Select all

"{:02d}/{:02d}/{} {:02d}:{:02d}"
particularly for the time display as times like 1:2 arguably look better rendered as 01:02.
Many thanks pythoncoder, much appreciated. :)