9 Replies Latest reply on Aug 25, 2015 2:37 PM by Intel_Alvarado

    Adafuit LCD Backpack & Parallax Boe-bot Shield Not working

    G_Da_Engineet

      Hello!!

      I've been struggling all day with my Edison.  I have the Blink sketch working from the Arduino, but I'm having trouble connecting my two major components:

       

      Adafruit LCD Backpack (SPI enabled/3 pin setup) =

      http://www.adafruit.com/products/292

       

      and

       

      Parallax Boe-bot Arduino Shield =

       

              https://www.parallax.com/product/32333

      https://www.parallax.com/product/32333

      I've looked all over the web to try to figure it out.  Together or apart I can't find a fix.  I'm very new to the Edison platform and I'd really appreciate any help or suggestions.

       

      THANKS VERY MUCH!!!!!!

        • 1. Re: Adafuit LCD Backpack & Parallax Boe-bot Shield Not working
          G_Da_Engineet

          Here is my script it might help:

          // Robotics with the BOE Shield - ForwardThreeSeconds
          // Make the BOE Shield-Bot roll forward for three seconds, then stop.
          #include "Wire.h"
          #include "LiquidCrystal.h"
          #include <Servo.h>                           // Include servo library

          Servo servoLeft;                             // Declare left and right servos
          Servo servoRight;
          LiquidCrystal lcd(3, 2, 4);
          void setup()                                 // Built-in initialization block
          {
            lcd.begin(16, 2);
            lcd.setCursor(0, 0);
            tone(4, 3000, 1000);                       // Play tone for 1 second
            delay(1000);                               // Delay to finish tone

            servoLeft.attach(13);                      // Attach left signal to pin 13
            servoRight.attach(12);                     // Attach right signal to pin 12

            // Full speed forward
            servoLeft.writeMicroseconds(1700);         // Left wheel counterclockwise
            servoRight.writeMicroseconds(1300);        // Right wheel clockwise
            lcd.print("Moving Forward");
            lcd.setCursor(0, 1);
            lcd.print("for 3");
            delay(1000);                               // ...for 3 seconds

            lcd.clear();
            lcd.setCursor(0, 0);
            lcd.print("Moving Forward");
            lcd.setCursor(0, 1);
            lcd.print("for 2");
            delay(1000);

            lcd.clear();
            lcd.setCursor(0, 0);
            lcd.print("Moving Forward");
            lcd.setCursor(0, 1);
            lcd.print("for 1");
            delay(1000);

            lcd.clear();
            lcd.setCursor(0, 0);
            lcd.print("Done Moving!!!!!");
            lcd.setCursor(0, 1);
            lcd.print("Reset to repeat");

            servoLeft.detach();                        // Stop sending servo signals
            servoRight.detach();
          }

          void loop()                                  // Main loop auto-repeats
          { // Empty, nothing needs repeating
          }

          • 2. Re: Adafuit LCD Backpack & Parallax Boe-bot Shield Not working
            G_Da_Engineet

            Bad news from Parallax support.  The let me know:

                 Unfortunately we don't provide support for custom code and have never used the Arduino Edison.

                 The BOE Arduino Shield is made to work with the Arduino UNO, Mega, and Duemilanove.

                 It has never been tested with the Edison version so it may not be compatible.

            So that part may just not work.  However, I'm still lost why the:

            Adafruit LCD Backpack (SPI enabled/3 pin setup) http://www.adafruit.com/products/292

             

            Doesn't work.  It seems that it should work.  Any thoughts are welcomed.

            • 3. Re: Adafuit LCD Backpack & Parallax Boe-bot Shield Not working
              Intel_Alvarado

              Hi,

               

              I’ve never tried to connect the Edison to those devices, but the first thing I’d check is that both the LCD Backpack and the Parallax BOE work separately. Have you tried to use them separately? Once you make sure that both devices work try connecting them both together and upload your code. Attach a picture of both devices connected to your Edison. Do you see any errors when uploading the code?

               

              Sergio

              • 4. Re: Adafuit LCD Backpack & Parallax Boe-bot Shield Not working
                G_Da_Engineet

                The devices are working independently only not on the Edison.  I have an Uno and it is running the project perfectly.

                The tests I have run are on the shield and the lcd independently on Edison, neither have worked. The only thing on my

                script that works is the piezo on pin 6.  the Servos on pin 12 and 13 won't run and the lcd on 2,3,and 4 won't work either.

                Here's a video link to correct operation: http://1drv.ms/1L2P2Dy  using an Arduino with a script listed below.  When installed on

                the Edison it only does what's shown in the pictures.  Thanks for the reply!!

                Adafruit Backpack (back).JPGBoe-bot Shield 1.JPGBoe-bot Shield 2.JPGBoe-bot Shield 3.JPG

                 

                 

                // Robotics with the BOE Shield - ForwardLeftRightBackward
                // Move forward, left, right, then backward for testing and tuning.
                #include "Wire.h"
                #include "LiquidCrystal.h"
                #include <Servo.h>                           // Include servo library

                Servo servoLeft;                             // Declare left and right servos
                Servo servoRight;
                LiquidCrystal lcd(3, 2, 4);

                void setup()                                 // Built-in initialization block
                {
                  lcd.begin(16, 2);
                  lcd.setCursor(0, 0);
                  lcd.print("Beep!!!!");
                  tone(6, 3000, 1000);                       // Play tone for 1 second
                  delay(1000);                               // Delay to finish tone

                  servoLeft.attach(13);                      // Attach left signal to pin 13
                  servoRight.attach(12);                     // Attach right signal to pin 12

                  // Full speed forward
                  lcd.clear();
                  lcd.setCursor(0, 0);
                  lcd.print("Full speed");
                  lcd.setCursor(0, 1);
                  lcd.print("forward");
                  servoLeft.writeMicroseconds(1700);         // Left wheel counterclockwise
                  servoRight.writeMicroseconds(1300);        // Right wheel clockwise
                  delay(2000);                               // ...for 2 seconds

                  // Turn left in place
                  lcd.clear();
                  lcd.setCursor(0, 0);
                  lcd.print("Turn left");
                  lcd.setCursor(0, 1);
                  lcd.print("in place");
                  servoLeft.writeMicroseconds(1300);         // Left wheel clockwise
                  servoRight.writeMicroseconds(1300);        // Right wheel clockwise
                  delay(600);                                // ...for 0.6 seconds

                  // Turn right in place
                  lcd.clear();
                  lcd.setCursor(0, 0);
                  lcd.print("Turn right");
                  lcd.setCursor(0, 1);
                  lcd.print("in place");
                  servoLeft.writeMicroseconds(1700);         // Left wheel counterclockwise
                  servoRight.writeMicroseconds(1700);        // Right wheel counterclockwise
                  delay(600);                                // ...for 0.6 seconds

                  // Full speed backward
                  lcd.clear();
                  lcd.setCursor(0, 0);
                  lcd.print("Full speed");
                  lcd.setCursor(0, 1);
                  lcd.print("backward");
                  servoLeft.writeMicroseconds(1300);         // Left wheel clockwise
                  servoRight.writeMicroseconds(1700);        // Right wheel counterclockwise
                  delay(2000);                               // ...for 2 seconds

                  // Pivot forward-left
                  lcd.clear();
                  lcd.setCursor(0, 0);
                  lcd.print("Pivot forward");
                  lcd.setCursor(0, 1);
                  lcd.print("left");
                  servoLeft.writeMicroseconds(1500);   // Left wheel stop
                  servoRight.writeMicroseconds(1300);  // Right wheel clockwise
                  delay(2000);                               // ...for 2 seconds

                  // Pivot forward-right
                  lcd.clear();
                  lcd.setCursor(0, 0);
                  lcd.print("Pivot forward");
                  lcd.setCursor(0, 1);
                  lcd.print("right");
                  servoLeft.writeMicroseconds(1700);   // Left wheel counterclockwise
                  servoRight.writeMicroseconds(1500);  // Right wheel stop
                  delay(2000);                               // ...for 2 seconds

                  // Pivot backward-left
                  lcd.clear();
                  lcd.setCursor(0, 0);
                  lcd.print("Pivot backward");
                  lcd.setCursor(0, 1);
                  lcd.print("left");
                  servoLeft.writeMicroseconds(1500);   // Left wheel stop
                  servoRight.writeMicroseconds(1700);  // Right wheel counterclockwise
                  delay(2000);                               // ...for 2 seconds

                  // Pivot backward-right
                  lcd.clear();
                  lcd.setCursor(0, 0);
                  lcd.print("Pivot backward");
                  lcd.setCursor(0, 1);
                  lcd.print("right");
                  servoLeft.writeMicroseconds(1300);     // Left wheel clockwise
                  servoRight.writeMicroseconds(1500);    // Right wheel stop
                  delay(2000);                               // ...for 2 seconds

                  lcd.clear();
                  lcd.setCursor(0, 0);
                  lcd.print("All Done!!");

                  servoLeft.detach();                        // Stop sending servo signals
                  servoRight.detach();
                }

                void loop()                                  // Main loop auto-repeats
                { // Empty, nothing needs repeating
                }

                • 5. Re: Adafuit LCD Backpack & Parallax Boe-bot Shield Not working
                  Intel_Alvarado

                  Hi,

                   

                  I tested the code on my Galileo and it failed to compile.  If you try this code in the IDE does it compile correctly? My error mas related to the LiquidCrystal library. I found a thread related to the LiquidCrystal library that you might find useful Re: Galileo LiquidCrystal Library Fixes . I’d suggest you to look at this thread and try the workaround provided. Also, if you have any errors attach them.

                   

                  Sergio

                  • 6. Re: Adafuit LCD Backpack & Parallax Boe-bot Shield Not working
                    G_Da_Engineet

                    Hey Sergio,

                    Thanks so much for the link! I do think that it is getting closer, but there's still an issue with that code.  The Adafruit LCD backpack requires a special LCD library (https://github.com/adafruit/LiquidCrystal) I've attached the correct CPP and CPP from the link you sent me.  I cant seem to track the differences.  Maybe that is the issue, at least with the LCD.  I also found a PDF that Intel produced with tests on shields.  The one on page 99, there's and Adafruit lcd shield that uses very similar hardware.  They made that shield work, but I can't see the identical parts to fix in the code.  I think the solution is in these documents, but I'm struggling to piece it all together.

                    Here's the links to the support files: http://1drv.ms/1E1p14W

                    Thanks!!

                    • 7. Re: Adafuit LCD Backpack & Parallax Boe-bot Shield Not working
                      G_Da_Engineet

                      WAIT!!!! Page 227 has the Adafruit lcd backpack!! I can't believe I missed it!!

                      • 8. Re: Adafuit LCD Backpack & Parallax Boe-bot Shield Not working
                        G_Da_Engineet

                        Ok, here's what's up:

                        The pdf on this link shows the way to fix LCD Library Page 229 and following.

                        I made some changes to the LCD library to get the Hello_SPI.ino working. 

                        It worked once, but then stopped working, I attached a link to a video of the current status.

                        I'm not sure what stopped working, but here's a link to all the new files: http://1drv.ms/1E1p14W

                        Any fixes would be very helpful. 

                        • 9. Re: Adafuit LCD Backpack & Parallax Boe-bot Shield Not working
                          Intel_Alvarado

                          Hi,

                           

                          Do you mean that you made some changes to the “HelloWorld_i2c” and “HelloWorld_SPI” sketches in the Compile and Upload section? Are you able to run these sketches without making any changes?

                           

                          Have you already seen this https://learn.adafruit.com/downloads/pdf/i2c-spi-lcd-backpack.pdf ?

                           

                          Sergio