drawPixel Rarely Working

Moderators: mdrjr, odroid

drawPixel Rarely Working

Unread postby Bilboed » Mon Mar 06, 2017 4:31 am

I am trying to update specific pixels on the show but it is not working.
"drawPixel" is used in show_main.ino (i.e. E[10:10X ) to update the pixel colour but it very rarely works. Perhaps 1 in a hundred times, no matter how long I sleep between each call.
The serial bus returns the text with the row and col, thus the formatting was correct.

I then updated the main loop in the ino file to draw a series of pixels and it also rarely works. The problem seems to be that drawPixel library function is not working.

Any help would be appreciated
Bilboed
 
Posts: 16
Joined: Sun Apr 14, 2013 8:36 pm
languages_spoken: english
ODROIDs: U2, U3 and Show

Re: drawPixel Rarely Working

Unread postby odroid » Tue Mar 07, 2017 10:47 am

Can you share your host side source code? We will test it.
User avatar
odroid
Site Admin
 
Posts: 24355
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: drawPixel Rarely Working

Unread postby hokoon » Fri Sep 01, 2017 11:23 am

odroid wrote:Can you share your host side source code? We will test it.


I confirm the issue.

Code modify from show_main.ino

Code: Select all
void setup()
{
    Serial.begin(500000);
    Serial.println("Welcome to the ODROID-SHOW");

    tft.begin();
    initPins();

    tft.fillScreen(backgroundColor);

    tft.drawPixel(100, 100, foregroundColor); // It just skip this line

   
    Timer1.initialize(20000);
    Timer1.attachInterrupt(timerCallback);
}
hokoon
 
Posts: 255
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1

Re: drawPixel Rarely Working

Unread postby hokoon » Tue Sep 05, 2017 12:08 pm

This is what I get when I try to draw a mandelbrot from Magazine (August 2014)
https://github.com/declanmalone/ODROID- ... ndelbrot.c

Image
hokoon
 
Posts: 255
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1

Re: drawPixel Rarely Working

Unread postby odroid » Tue Sep 05, 2017 1:13 pm

Can you lower the SPI clock speed to narrow down the root causes?
It will be helpful to confirm whether the Adafruit Gfx library has an issue or not.

Anyway, we will try the example code you pointed.
User avatar
odroid
Site Admin
 
Posts: 24355
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: drawPixel Rarely Working

Unread postby lsc1117 » Tue Sep 05, 2017 5:54 pm

Hi,

I tried to run the mandelbrot example a hundred times. and It is working well.

test.jpg
test.jpg (264.48 KiB) Viewed 103 times


Did you upload the Declanmalone's .ino file?

You should upload the Declanmalone's f/w before running the example.
lsc1117
 
Posts: 44
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: drawPixel Rarely Working

Unread postby hokoon » Wed Sep 06, 2017 2:08 am

I manage to solve the problem by replace drawPixel with fillRect

Image

btw, I'm using lastest show_main.ino from HK repo (https://github.com/hardkernel/ODROID-SHOW)
hokoon
 
Posts: 255
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1


Return to SHOW

Who is online

Users browsing this forum: No registered users and 1 guest