Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

New user trying to trouble shoot the maze solver


#1

Hi everyone, my name is Francis and I’m totally new to Arduino and the ZUMO. I have the following:
Running Mac OSX 10.11.6
I am trying to get the maze solver sketch to run (or to do anything for that matter). This is what I have done:
All the necessary shield libraries are installed.
I get no errors when uploading to the ZUMO.
After uploading is complete, the LCD displays a series of bars across the top half of the LCD.
It beeps once and pin 13 LED remains on. I disconnect the USB cable and my understanding is that I have to pass from left to right the line sensors over my 0.75 inch wide black line in order to calibrate it. Anyway I do this but nothing happens and the LED never turns off.
My maze is almost an exact copy of the maze shown on the Pololu site.
My batteries are fresh inside the ZUMO.
It’s a brand new ZUMO purchased from Pololu.
Nothing shows on the LCD screen except those bars across the top half.

What things have I overlooked or doing completely wrong? Just a hint that’s all I need. I’m not asking for any answers etc as I want to trouble shoot this but at the same time not end up pounding my head into a brick wall in order to achieve this. Maybe I’ve just not read something properly etc. If the motors speeds are wrong in the code will nothing work? Apologies if I’ve posted in the wrong area.

Regards

Francis


#2

Hello, Francis.

It sounds like you have one of our Zumo 32U4 robots. Did you adjust the contrast for the screen? You can find instructions for how to do this under the “LCD” heading of the “User Interface” section in the Zumo 32U4’s user’s guide, which is linked to on the “Resources” tab of its product page. If you adjusted the contrast already, could you post video here that shows the bars on the screen and the other behavior you mentioned? Can you confirm that you are using the “MazeSolver” sketch? Do you get any beeps from your robot when you turn it on?

-Nathan


#3

Hi Nathan, yes, sorry it is a Zumo 32U4. I haven’t adjusted the screen contrast but I can see easily a row of 8 small rectangles occupying the upper half of the LCD. Yes I am using the maze solver sketch. When I try to upload the sketch (BTW I am using a brand new good quality USB cable too) the TX RX LEDs flash, there is a brief flash of LED to pin13, a beep sound and then PIN 13 is high and remains high at infinitum. The picture have included is shot over some drawings of mine but it makes no difference if the 32U4 is sitting over the maze. Thanks in advance for trying to help.
regards

Francis


#4

Those bars are not what the LCD is meant to display, but the contrast could be one thing that is causing them to appear there. Could you try adjusting the contrast per the instructions I linked to in the last post to see if anything displays on the screen? Also, can you verify that the MazeSolver sketch is loaded on the Zumo by pressing the “A” button about 10 seconds after powering the robot on (the robot should rotate itself left and then right)?

-Nathan


#5

Hi Nathan, ok so if I adjust the LCD contrast the only difference I see between the images I sent you are either those bars across the top or no bars or a combination of very dark bars across the top and lighter bars across the bottom. After uploading the sketch, I power on the ZUMO wait ten seconds and press the A button, nothing happens. I’m not sure what the LCD should look like. Certainly when I first powered it up (out of the box- I am using brand new NiMH batteries) I could read the screen very easily for the simple button test etc. I never touched the LCD contrast as I could easily read it.
So I’m really perplexed as the right LEDs are flashing to tell me the upload is happening and there are no error messages from the IDE but with that test u asked me to do the robot doesn’t do anything. So I guess for some reason the sketch is simply not uploading? I know I have uploaded other sketches and they work fine (but these ones simply were for the flashing LEDs etc and simple left right track movement.

regards

Francis


#6

Now I’m really going crazy LOL. I can’t upload any sketch, eg the buzzer etc still get the row of bars on the LCD screen. Should I remove all libraries and install them again.

regards

Francis


#7

Hi again, so my question is this, what can the problem be if the TX RX LEDs flash, finish flashing the Pin 13 is on, the IDE doesn’t send me any errors but nothing happens with the ZUMO. (with the power switch on of course). With the exception of flashing leds for v simple sketches. BTW I’m only at this stage trying to upload sketches from you guys not my own just yet. I couldn’t find any documentation on all top bars being on either and as I said adjusting the contrast simply turned them off with a blank screen or turned on both top and bottom. It’s a brand new ZUMO I just received and bought as a birthday present for my kid (BTW no he hasn’t dropped it, spilt water on it etc just in case anyone is thinking this). I worked pulling apart and repairing/servicing electron microscopes, so I consider myself technically competent, so I’m kind of at a dead end here. Hope you guys can suggest something else.


#8

It sounds like the sketch might not be loading properly. One of the conditions that can cause the LCD to display that row of bars is if the LCD is powered and the sketch does not send it anything to display. Could you look through the “Programming using the Arduino IDE” section of the Zumo user’s guide and compare it to your setup to be sure everything is configured correctly and then try to load a simple sketch like “Blink” to see if it loads? Could you post any error messages you receive from the IDE here and let me know at what step they occur?

-Nathan


#9

Ok mate, will do. I’ll have to send it later as have to go out now. But I’m on o it! Thanks!

Francis


#10

Hi Nathan, Ok here might be the problem at last! Ok for some reason now my port is reading /dev/cu.Bluetooth-Incoming-Port
Instead of reading /dev/tty.usbmodem
When I set this up (I did indeed read thoroughly the instructions), I did note that when I went to the ports in my IDE (using a mac) that there was no option for the correct port, only a serial port grayed out and /dev/cu.Bluetooth-Incoming-Port but for some reason it changed of course when I plugged the USB cable into the ZUMO. So from this is this the case I must set the port manually every time if I have disconnected the USB from the Zumo? Is there no way to set that port as my default setting as I’m not using the Bluetooth port. Have I understood this correctly or not? But wait I then went and uploaded the maze solver again (still getting all black bars) then after the beep and the pin 13 coming on the Zumo just went straight ahead after a wait period??? I had to turn it off to stop it. Ok I restarted the IDE but now I have some crazy port number when the ZUMO is plugged in, it reads:
/dev/cu usbmodem1421 (Pololu A-Star 32U4). How can this be? Now I’m really confused. Or is now correct as the instructions say the port name will begin with
/dev/tty.usbmodem

Anyway the black bars are still there and even when I tried to repeat uploading the sketch, making sure that the correct port was selected (BTW I do have the correct Additional boards manager URLs etc set up. So now I am very perplexed, oh and yes pressing the A button shows nothing on the LCD. Again , I’ve adjusted it but only the black squares, black squares and slightly darker ones or nothing, no matter which variation I have of those LCD contrast settings, does any text at all appear on the LCD. I’m sure trouble shooting is part of the game but never thought I’d spend so much time rather than writing sketches for this thing LOL!
OK blinking-LED I get no errors from the IDE and I can save and upload different delay times and I do get some variation of the pin 13 flashing, although if I use the default setting for say a pulsed LED ie high is 10, low is 20 then it’s not really a pulse but a almost constantly on as I expect with two similar values for high and low? Also too BTW the LCD still remains the same, ie all bars are on across the top. And also ordinary “Blink” does infact work but still LCD the same. So I guess the sketch is being uploaded at least these two simple ones. Anyway it’s very late here where I am. I’ll await what you might think of next.
regards

Francis


#11

BTW here is a screen shot of the system profile showing a USB connection


#12

Ok I have been reading this thread:
https://forum.arduino.cc/index.php?topic=150734.0

So I understand now re the ports but none the less it’s still not able to take any other sketch other than something simple led blinking or blink and that problem of the LCD.
Ok I’ll keep my mouth shout now and just wait patiently for a reply thanks in advance.

ever determined

Francis


#13

/dev/cu usbmodem1421 (Pololu A-Star 32U4) sounds like a correct device name for the Zumo (which uses our A-Star bootloader). The “bluetooth” ports are not the correct ones. Please note that if you unplug the USB connection to the Zumo, the ports might disapear and you might need to re-select the correct port when you plug the Zumo back in. Also, with short delays in the blink sketch like 10ms HIGH and 20ms LOW, the switching will be too quick for the eye to notice, so longer times like 250ms (1/4th of a second) and above are better for testing like this.

It sounds like the Arduino IDE is loading code on the robot again. Could you try loading the LCDBasics sketch to see if the LCD displays “Hi” and “1234” (it should do this without having to press any buttons) so we can verify that the LCD is not working? You might need to adjust the contrast again, though once you have adjusted it so the text is legible, it should not need any further adjustment.

Are you getting any errors in the IDE when you try to load the longer sketches?

-Nathan


#14

Hi, ok just uploaed the LCD “hello world” sketch, nothing was displayed, no IDE errors, The correct port was being used but now a RED led on the LHS of the board is coming on and staying on. This LED is either D10 or D11? Im not sure, from the schematic but it is the red LED next to the contrast control pot on the board. No errors anytime when trying to upload a sketch, they just don’t work.

regards

Francis


#15

BTW if I then disconnect the USB and power up after uploading that sketch, then the RHS red LED on the board lights up and stays on. I can’t figure this out as those LEDs are supposed to only light up when the IR emitters are in use. There is no function to call them for the LCD? what does this mean?


#16

Hi, so is my LCD dead? or has something gone open circuit? with LEDs coming on that aren’t supposed to.

It’s a brand new Zumo just purchased. At the moment I can’t do anything constructive with it.

best regards

Francis


#19

Those LEDs are the indecators for the proximity sensor IR emmitters and they are controlled by digital pin 5. They should not be coming on for the “LCDBasics” sketch.

What version of the Arduino IDE are you using? Could you enable the verbose mode for uploads in the Arduino IDE? You can do this in the File->Preferences menu of the IDE and the picture below shows the appropriate box to check. After you have enabled the verbose mode, can you upload the “LCDBasics” sketch again and, when it is done uploading post all of the text in the black box at the bottom of the screen. You should be able select it with your mouse and copy and paste it using the clipboard.

-Nathan


#20

Hi, ok will do. Yes that is what I thought, that those LEDs have nothing to do with the LCD.
Ok will get back to you on this thanks!

regards

Francis


#21

Hi Nathan, ok I don’t have a sketch labelled exactly “LCDBasics” but have uploaded the “Hello World” Sketch. The IDE version is
1.6.7 of Arduino.
BTW still getting a pin 5 coming on.
See verbose mode text below.

Sketch uses 5,750 bytes (20%) of program storage space. Maximum is 28,672 bytes.
Global variables use 194 bytes (7%) of dynamic memory, leaving 2,366 bytes for local variables. Maximum is 2,560 bytes.
Forcing reset using 1200bps open/close on port /dev/cu.usbmodem1421
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodem1421, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodem1421, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodem1421, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodem1421, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodem1421, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodem1421, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodem1421, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodem1421, } => {}
Uploading using selected port: /dev/cu.usbmodem1421
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -P/dev/cu.usbmodem1421 -b57600 -D -Uflash:w:/var/folders/_h/vllqnsf95yb7yqz0ytxjlsl40000gn/T/build321d1f758f85a90823a1fd16782b7400.tmp/HelloWorld.ino.hex:i 

avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/Francis/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem1421
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587
avrdude: reading input file "/var/folders/_h/vllqnsf95yb7yqz0ytxjlsl40000gn/T/build321d1f758f85a90823a1fd16782b7400.tmp/HelloWorld.ino.hex"
avrdude: writing flash (5750 bytes):

Writing | ################################################## | 100% 0.43s

avrdude: 5750 bytes of flash written
avrdude: verifying flash memory against /var/folders/_h/vllqnsf95yb7yqz0ytxjlsl40000gn/T/build321d1f758f85a90823a1fd16782b7400.tmp/HelloWorld.ino.hex:
avrdude: load data flash data from input file /var/folders/_h/vllqnsf95yb7yqz0ytxjlsl40000gn/T/build321d1f758f85a90823a1fd16782b7400.tmp/HelloWorld.ino.hex:
avrdude: input file /var/folders/_h/vllqnsf95yb7yqz0ytxjlsl40000gn/T/build321d1f758f85a90823a1fd16782b7400.tmp/HelloWorld.ino.hex contains 5750 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.05s

avrdude: verifying ...
avrdude: 5750 bytes of flash verified

avrdude done.  Thank you.

#22

It sounds like you might have installed only the A-star drivers correctly and might be missing our Arduino library for the Zumo 32U4. Perhaps you installed the Zumo for Arduino library, which is for a different robot and the examples would not work well with the Zumo32U4. The “Zumo 32U4 Arduino library” section of the Zumo user’s guide describes how to install the proper library. Once you have installed the library, the LCDBasics and MazeSolver example sketches can be found under File->Examples->Zumo32U4 in the Arduino IDE.

-Nathan