digitalWrite hangs sketch

Discussion in 'UDOO NEO' started by Maurice, Apr 19, 2016.

  1. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Maurice, as in the other issue was written it is not allowed by NXP to set the pinmode in the main loop. Only during the setup section. I think this is the root cause of the problem you are facing with digitalwrite. For analogwrite you are also not allowed (or it is now neglected) to do a pinmode at all.
     
  2. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    @waltervl, if you don't do a digitalWrite() then the display works fine, with the code that switches pinMode() for the display, if this would not be allowed by NXP the display would never ever work, and that is not the case. The digitalWrite I do has no relation with the pins used by the display. Here is a code illustrating the problem: http://pastebin.com/VPLWQ82d

    As I now also own a Arduino Mega 2560 I have verified that it does work on an Arduino. UDOO claims the Neo is Arduino compatible. If what you are saying is correct the Neo is not, and will never be, Arduino compatible, but my display would never work, and yet is does as long as you don't do a digitalWrite().

    edit: The skillfull technicians of UDOO are checking this out, I think it is better to have them give the answer
     
    Last edited: May 13, 2016
    waltervl likes this.
  3. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Dear Maurice,
    I'm sorry if this takes some time, we'll answer you in the ticketing system.
     
  4. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    That is no problem. I know that it is on your list. I can continue at this time with my Arduino Mega.
     

Share This Page