We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Touch Screen Shield with Arduino Dock



  • UPDATE: after changing the pins as written in the reply the touch screen works....partially. Confusingly the touch screen works ONLY if I

    1. upload code to omega without touch screen in.
    2. plug touch screen into arduino uno with new code
    3. then plug back into omega with the new code running.

    IT DOES NOT WORK if I have the touch shield in and I upload new code, the graphics change accordingly but I lose touch functionality.

    ORIGINAL
    I had a touch screen shield that works perfectly with my Arduino Uno. I wanted to repeat the same project using a Omega, however realised there were no Analog I/O pins.

    I purchased the dock and am trying to get this touch screen working however the example library file supplied by the touch screen manufacturer doesn't seem to be working with the dock.

    The example works perfectly with my Uno however not with the dock, the screen just has black and white lines across it.

    I assume it has something to do with the analog pins as the non-touch related example where you print text and shapes works fine on the dock, just not the touch related example.

    Any ideas why it wouldn't be working?

    This is the Touch Screen



  • @Angus-Ryan Technical Details of Adafruit's 2.8" TFT Touch Screen Shield v2: 'The display uses digital pins 13-9. Touchscreen controller requires digital pin 8. microSD pin requires digital pin #4.' - of Arduino. (That means it doesn't require any analog pins at all ?!)

    Omega2(+) on Arduino Dock 2 also uses Arduino's digital pins 11, 12 and 13.
    Firstly, try to set free them with:
    fast-gpio set-input 15; fast-gpio set-input 16; fast-gpio set-input 17

    If this is not enough you should try to make a very simple hardware modification on the Dock.

    Good luck.



  • @György-Farkas set it via the terminal?



  • @György-Farkas Also if the graphics work on the screen, however not the touch functionality wouldn't that mean that pins 13-9 arent the problem (even though the Omega uses 11-13) as the graphics are displaying fine, rather that pin 8's functionality is not working?



  • @Angus-Ryan Omega2(+) uses Arduino UNO's analog pins 4, 5 (I2C) and digital pins 0, 1 (serial communication) and 11-13 (ICSP ie. the programmer) on Arduino Dock 2.
    Display Does the programming / flashing Arduino with Omega work well if this shield is plugged in?
    Touch Screen I don't have such Adafruit gadget - I have read its 'Technical Details' only. Do you have 'v2' ie. its second version indeed?



  • @György-Farkas The shield works perfectly when plugged into the dock and the example 'graphic test' is flashed wirelessly to the omega. However when I flash the 'touch test' the touch screen seems to just be black and white strips of light (clearly stuffing up and struggling).

    and yes I have v2.



  • @György-Farkas this is the example code I'm trying to run

    Example Touch Screen

    Appreciate your help by the way!



  • @György-Farkas 0_1551784520420_20190305_221342.jpg

    That is what it currently is displaying

    0_1551784556292_Screenshot_20190305-221409_Chrome.jpg

    This is what it's meant to display, which works when using my arduino uno.



  • @György-Farkas please read update at top of page.



  • @Angus-Ryan Try to run these commands on Omega's CLI (Command Line) please:
    (# Setting free Arduino's SPI bus)
    fast-gpio set-input 15
    fast-gpio set-input 16
    fast-gpio set-input 17
    (# Reset Arduino)
    fast-gpio set-output 19
    fast-gpio set 19 1
    fast-gpio set 19 0

    See also Using the Omega’s GPIOs



  • @György-Farkas kind of worked. If I touch it once, the whole screen keeps registering clicks everywhere continously. The project works on my arduino, one click turns a button on, again turns it off.

    On the omega i touch the button and it turns on and then continously flickers on and off without it being touched? It's as if im spamming my finger tapping everywhere.



  • @Angus-Ryan said in Touch Screen Shield with Arduino Dock:

    kind of worked. If I touch it once, the whole screen keeps registering clicks everywhere continously.
    The project works on my arduino, one click turns a button on, again turns it off.

    Does this mean "it worked well on your Arduino" or "it worked well on your Arduino Dock 2"?

    On the omega i touch the button and it turns on and then continously flickers on and off without it being touched? It's as if im spamming my finger tapping everywhere.

    Sorry, I don't fully understand this. 😞
    Does this mean whereas you typed the above commands "it did not work well on your Arduino Dock 2"?

    BTW your shield should work well on Arduino Dock 2 without Omega too. Switch the power off, remove Omega and try the shield on the Dock. What's going on?



  • @György-Farkas it seems setting the inputs 'fast-gpio set-input 15' as well as 16 and 17 makes the touch screen work in the dock (while omega is plugged in), but causes the touch screen to think its repeatedly being tapped without actually tapping it. The first touch works, but then the screen acts as if its being touched everywhere. For example I have three buttons which when tapped change colour, what happens is when I tap one button it changes colour and then all of a sudden the other buttons start changing colours and flickering (as if i am tapping them when I am not). (without the omega plugged in touch screen doesnt respond).

    WHEREAS in the Arduino Uno (not dock) touch screen works perfectly.



Looks like your connection to Community was lost, please wait while we try to reconnect.