drawPixel Rarely Working

Post Reply
Bilboed
Posts: 17
Joined: Sun Apr 14, 2013 8:36 pm
languages_spoken: english
ODROIDs: U2, U3 and Show
Has thanked: 0
Been thanked: 0
Contact:

drawPixel Rarely Working

Unread post by 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

User avatar
odroid
Site Admin
Posts: 32358
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 146 times
Been thanked: 325 times
Contact:

Re: drawPixel Rarely Working

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

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

hokoon
Posts: 262
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1
Has thanked: 0
Been thanked: 0
Contact:

Re: drawPixel Rarely Working

Unread post by 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: 262
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1
Has thanked: 0
Been thanked: 0
Contact:

Re: drawPixel Rarely Working

Unread post by 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

User avatar
odroid
Site Admin
Posts: 32358
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 146 times
Been thanked: 325 times
Contact:

Re: drawPixel Rarely Working

Unread post by 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.

lsc1117
Posts: 160
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 4 times
Contact:

Re: drawPixel Rarely Working

Unread post by 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 1437 times
Did you upload the Declanmalone's .ino file?

You should upload the Declanmalone's f/w before running the example.

hokoon
Posts: 262
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1
Has thanked: 0
Been thanked: 0
Contact:

Re: drawPixel Rarely Working

Unread post by 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)

Post Reply

Return to “SHOW”

Who is online

Users browsing this forum: No registered users and 1 guest