Ultrasonic Module HC-SR04 on udoo Problem

Discussion in 'Arduino IDE' started by xaxy, Jan 10, 2015.

  1. xaxy

    xaxy New Member

    Joined:
    Dec 26, 2013
    Messages:
    5
    Likes Received:
    0
    I trying to use a Ultrasonic Module HC-SR04 on my Udoo board.
    I have tried use Newping 1.5 and 1.6 version but non of them works.
    https://code.google.com/p/arduino-new-ping/

    Any one got HC-SR04 to work whit Udoo?

    I get this error:

    /home/ubuntu/Arduino/libraries/NewPing/NewPing.cpp: In constructor 'NewPing::NewPing(uint8_t, uint8_t, unsigned int)':
    /home/ubuntu/Arduino/libraries/NewPing/NewPing.cpp:21:17: error: cannot convert 'RwReg* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
    _triggerOutput = portOutputRegister(digitalPinToPort(trigger_pin)); // Get the output port register for the trigger pin.
    ^
    /home/ubuntu/Arduino/libraries/NewPing/NewPing.cpp:22:13: error: cannot convert 'RoReg* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
    _echoInput = portInputRegister(digitalPinToPort(echo_pin)); // Get the input port register for the echo pin.
    ^
    /home/ubuntu/Arduino/libraries/NewPing/NewPing.cpp:24:75: error: 'portModeRegister' was not declared in this scope
    _triggerMode = (uint8_t *) portModeRegister(digitalPinToPort(trigger_pin)); // Get the port mode register for the trigger pin.
    ^
    Error compiling.
     

Share This Page