Search found 70 matches

by Peter.Kenyon
Fri Jun 24, 2016 7:10 am
Forum: Drivers for External Components
Topic: (WIP) Sitronix ST7735 TFT Display
Replies: 31
Views: 17944

Re: (WIP) Sitronix ST7735 TFT Display

good point, but not seen any problems yet, but only updating a few things now and again, not a scrolling console window or anything.
by Peter.Kenyon
Wed Jun 22, 2016 8:34 am
Forum: Drivers for External Components
Topic: (WIP) Sitronix ST7735 TFT Display
Replies: 31
Views: 17944

Re: (WIP) Sitronix ST7735 TFT Display

for efficiency I guess the glyph table would only need to be 2 or 4 bits per pixel,
Is it really as simple as : new pixel = ((1-weight) * old) + (weight*color) ??
Sounds like a challenge ;-)
Bresenham's line drawing algorithm is straightforward BUT not if you want to ant alias the jaggies
by Peter.Kenyon
Wed Jun 22, 2016 7:51 am
Forum: Drivers for External Components
Topic: (WIP) Sitronix ST7735 TFT Display
Replies: 31
Views: 17944

Re: (WIP) Sitronix ST7735 TFT Display

I'm guessing that you could store a glyph table with byte values representing weight ie 255 is full on and 0 is transparent. Then you could use a run time algortithm to blend into the background display, but sounds quite tricky and would need a backing buffer or are you suggesting something complete...
by Peter.Kenyon
Wed Jun 22, 2016 7:35 am
Forum: ESP8266 boards
Topic: Making sounds
Replies: 12
Views: 13540

Re: Making sounds

I hooked up the ghi Tunes module to the pyboard pwm and it seems to be fine,
Here is some code (in C#) that parse the rttl format of which there are many songs available
https://www.ghielectronics.com/communit ... /entry/839
by Peter.Kenyon
Wed Jun 22, 2016 7:25 am
Forum: Drivers for External Components
Topic: (WIP) Sitronix ST7735 TFT Display
Replies: 31
Views: 17944

Re: (WIP) Sitronix ST7735 TFT Display

wrt fonts one technique I found quite useful is to store bitmap images of antialiased fonts on the sd card,. This presupposes you know the background color and foreground color, but there is plenty of room for lucida green 24 say and Helvetica alice blue 12, and nowadays most displays should be uncl...
by Peter.Kenyon
Tue Jun 21, 2016 5:46 am
Forum: Drivers for External Components
Topic: (WIP) Sitronix ST7735 TFT Display
Replies: 31
Views: 17944

Re: (WIP) Sitronix ST7735 TFT Display

well I guessed that it was a typo on the backing field, the ability to replace the function with a simple assignment is a powerful tool ?, (adults only coding) @platforma : similar in backlight I believe ps got the ghi n18 up and running, had to configure the spi correctly and init is different (as ...
by Peter.Kenyon
Mon Jun 20, 2016 6:47 pm
Forum: General Discussion and Questions
Topic: machine or pyb
Replies: 2
Views: 3419

Re: machine or pyb

thanks dave, I can see that machine would be more generic across platforms.
by Peter.Kenyon
Mon Jun 20, 2016 5:20 pm
Forum: General Discussion and Questions
Topic: machine or pyb
Replies: 2
Views: 3419

machine or pyb

been away a while and came back to play and I'm confused as to which import I should use on the pyboard
import machine
or
import pyb

they both seem to do the same thing - are they the same thing?
by Peter.Kenyon
Mon Jun 20, 2016 5:15 pm
Forum: Drivers for External Components
Topic: (WIP) Sitronix ST7735 TFT Display
Replies: 31
Views: 17944

Re: (WIP) Sitronix ST7735 TFT Display

does this method do something I don't understand.

Code: Select all

def power(self, state=None):
    """
    Get/set display power.
    """
    if state is None:
        return self.power  # ???
    self.write_cmd(CMD_DISPON if state else CMD_DISPOFF)
    self.power = state # ???
by Peter.Kenyon
Mon Jun 20, 2016 3:09 pm
Forum: Drivers for External Components
Topic: (WIP) Sitronix ST7735 TFT Display
Replies: 31
Views: 17944

Re: (WIP) Sitronix ST7735 TFT Display

Been trying to get the GHI N18 display running. https://www.ghielectronics.com/catalog/product/425 I think its the same controller st7735, but I am a bit confused as to wether I should use pyb.SPI or machine.SPI and neither contain the write command only send. Has the api changed sometime. Anyway no...