I have been trying to talk to a Hokuyo URG04 LIDAR over USB from a teensy3.1. It has been interesting and perhaps this can help someone and maybe someone can provide a technical evaluation of what is happening:
1. First Trial- MEGA2560 with full-size USB host shield. On power up the LIDAR refuses to respond to the startup command line UNLESS the MEGA and LIDAR are both powered up and then the RESET button is pressed on either the shield on the MEGA. Then mgaically the LIDAR responds and turns on, and LIDAR data is now received correctly every 28ms. Ok. Why the need for a reset ? Anyway, not really interested in the MEGA so on to the teensy 3.1
2. Trial with teensy 3.1 and USB mini host shield: Connected everything up as per web site. LIDAR does not respond to start command BUT if you hit the RESET button on the teensy3.1, the program is downloaded again and occassionally the command is accepted and the LIDAR starts up and sends data every 28ms. But if the PC is not connected the RESET button never starts the LIDAR. Hmmmm. Read up on teensy3.1 resets and found that the RESET button is really a PROGRAM button so if no PC is present it is useless. Then I found that there are two REBOOT methods - 1) ground the R pad under the teensy3.1 or 2) do a power on reboot.
3. OK, so I wired up the R pad and powered the teensy3.1 and LIDAR up. Will not accept any command BUT do the RESET twice and the LIDAR comes on every time and all is good. You can do the same thing by powering up the LIDAR and the USB host and then powering up the teensy3.1 twice !
So, I guess I am happy that I can make it work - I suppose I can figure out some simple way to RESET twice on startup though any suggestions appreciated. BUT .. why does this happen ? BTW - I am using the technique shown the the acm-terminal example in the USB HOST shield library.
Best to all.
VS
1. First Trial- MEGA2560 with full-size USB host shield. On power up the LIDAR refuses to respond to the startup command line UNLESS the MEGA and LIDAR are both powered up and then the RESET button is pressed on either the shield on the MEGA. Then mgaically the LIDAR responds and turns on, and LIDAR data is now received correctly every 28ms. Ok. Why the need for a reset ? Anyway, not really interested in the MEGA so on to the teensy 3.1
2. Trial with teensy 3.1 and USB mini host shield: Connected everything up as per web site. LIDAR does not respond to start command BUT if you hit the RESET button on the teensy3.1, the program is downloaded again and occassionally the command is accepted and the LIDAR starts up and sends data every 28ms. But if the PC is not connected the RESET button never starts the LIDAR. Hmmmm. Read up on teensy3.1 resets and found that the RESET button is really a PROGRAM button so if no PC is present it is useless. Then I found that there are two REBOOT methods - 1) ground the R pad under the teensy3.1 or 2) do a power on reboot.
3. OK, so I wired up the R pad and powered the teensy3.1 and LIDAR up. Will not accept any command BUT do the RESET twice and the LIDAR comes on every time and all is good. You can do the same thing by powering up the LIDAR and the USB host and then powering up the teensy3.1 twice !
So, I guess I am happy that I can make it work - I suppose I can figure out some simple way to RESET twice on startup though any suggestions appreciated. BUT .. why does this happen ? BTW - I am using the technique shown the the acm-terminal example in the USB HOST shield library.
Best to all.
VS