Pixy pet 2 robot code error

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
greenfrog6
 
Posts: 6
Joined: Thu Nov 21, 2019 12:09 am

Pixy pet 2 robot code error

Post by greenfrog6 »

I purchased the pixy pet robot vision follower and have put it together. I am trying to upload the code from the project instructions on your website and the following error message comes up: How do I fix this? Please help.

Arduino: 1.8.10 (Windows 10), Board: "Arduino Leonardo"



Pixy2

sketch_nov20a:124:1: error: a function-definition is not allowed here before '{' token

{

^

sketch_nov20a:137:1: error: a function-definition is not allowed here before '{' token

{

^

sketch_nov20a:163:1: error: a function-definition is not allowed here before '{' token

{

^

sketch_nov20a:206:1: error: a function-definition is not allowed here before '{' token

{

^

sketch_nov20a:239:1: error: a function-definition is not allowed here before '{' token

{

^

C:\Users\blah\Desktop\adruino\sketch_nov20a\sketch_nov20a.ino: At global scope:

C:\Users\blah\Desktop\adruino\sketch_nov20a\sketch_nov20a.ino:68:3: warning: 'setup()::ServoLoop::ServoLoop(int32_t, int32_t)' used but never defined

ServoLoop(int32_t proportionalGain, int32_t derivativeGain);

^~~~~~~~~

Multiple libraries were found for "Servo.h"
Used: C:\Program
Multiple libraries were found for "ArduinoRobotMotorBoard.h"
Used: C:\Program
Multiple libraries were found for "SPI.h"
Used: C:\Program
Multiple libraries were found for "PIDLoop.h"
Used: C:\Users\blah\Documents\Arduino\libraries\Pixy2
Multiple libraries were found for "Wire.h"
Used: C:\Program
exit status 1
expected primary-expression before 'proportionalGain'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Attachments
Capture.PNG
Capture.PNG (60.65 KiB) Viewed 339 times

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Pixy pet 2 robot code error

Post by adafruit_support_bill »

The guide was written for the original Pixy CMUcam5. It has not been tested with the newer Pixy2 and associated Pixy libraries.

It also appears that you have multiple copies of some libraries installed. This can confuse the Arduino IDE:
Multiple libraries were found for "Servo.h"
Used: C:\Program
Multiple libraries were found for "ArduinoRobotMotorBoard.h"
Used: C:\Program
Multiple libraries were found for "SPI.h"
Used: C:\Program
Multiple libraries were found for "PIDLoop.h"
Used: C:\Users\blah\Documents\Arduino\libraries\Pixy2
Multiple libraries were found for "Wire.h"
Used: C:\Program

User avatar
greenfrog6
 
Posts: 6
Joined: Thu Nov 21, 2019 12:09 am

Re: Pixy pet 2 robot code error

Post by greenfrog6 »

Thank you. However, if you review the site, this is what you are selling with that project, the code is contained inside of the project as well. I think if it didn't work you might consider not selling the project any longer? Sorry, i'm just confused about all this. Also, you are correct, there are multiple libraries, i added them trying to get past this error, which it did not work.

QUESTION 1: Can you please correct the code that comes as part of the purchased project and send me the updates? I need it working for a class project asap. thank you!

QUESTION 2: If not able to provide fix, can I have a refund since what you're selling doesn't actually work with the substituted hardware?

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Pixy pet 2 robot code error

Post by adafruit_support_bill »

We do not sell this as a kit. The guide lists the parts used and includes instructions for one substitution for the original Leonardo board. Other substitutions have not been tested.

If you have purchased parts you are not able to use, they may be returned subject to our returns policy: https://www.adafruit.com/shippinginfo/
Please contact [email protected] with a link to this thread to arrange returns.

User avatar
greenfrog6
 
Posts: 6
Joined: Thu Nov 21, 2019 12:09 am

Re: Pixy pet 2 robot code error

Post by greenfrog6 »

This is the link that I purchased the project from - please take time and review it. notice it details the parts and code as part of the project kit. i did not deviate from this page and ordered as directed every part thats on this page.

https://learn.adafruit.com/pixy-pet-rob ... m/overview

Also, please note - would you mind providing answers to the code question after you review the link above. If you cant make it work - please take the site and project down so others dont waist time and money.

User avatar
kafkas
 
Posts: 1
Joined: Wed Dec 25, 2019 9:33 am

Re: Pixy pet 2 robot code error

Post by kafkas »

Hi, I have pixy2 too. And I want to do this project.
Could you correct your mistake?
Can this be done with codes? What is the result? Thanks

User avatar
greenfrog6
 
Posts: 6
Joined: Thu Nov 21, 2019 12:09 am

Re: Pixy pet 2 robot code error

Post by greenfrog6 »

No I could not fix it. And I never got a response that showed me how, so it is a dead end. I’m sorry that you bought the robot because it is virtually useless. Please tell me if you find a solution. Personally I’ve given up on the project.

User avatar
marsmen
 
Posts: 8
Joined: Fri May 31, 2019 2:34 am

Re: Pixy pet 2 robot code error

Post by marsmen »

B03F2EE2-EA4C-499D-B9E3-2F43AE157B6E.JPG
B03F2EE2-EA4C-499D-B9E3-2F43AE157B6E.JPG (694.23 KiB) Viewed 188 times
The Adafruit's stance on not owning up to having a list of kitted parts for a project followed by the tough luck "return your parts" comment is in poor taste.

Pixy Pet Robot is based on hardware that is no longer available (the Pixy camera). The project should be flagged as such. Ideally, just update the project. Pixy2 is different hardware and firmware and thus the code needs altering.

I couldn't find a Pixy camera, so a week ago, I bought everything to build it and went with a Pixy2. Thought the code just needed some tweaking, but once I dove in, I ran into the same issues that this looked dead, but fear not. I found a couple other resources. I went with the following:

https://pixycam.com/projects/
https://docs.pixycam.com/wiki/doku.php? ... zumo_howto

Sadly, you do need to modify the ribbon cable (I tested with my hardware and recommend just to do it). I have found all the information in the wiki and its' links. There are a few tuning things to do with the camera which I recommend practicing and learning first with just the pan-tilt practice and image capturing.

Mine is running, but not without some hardware modifications. I also need to look further into the code as this doesn't behave 100% as all the cool videos I've watched.

I'm excited to show this off on Tuesday to my robotics club.

I hope you have kept your parts and can make your's work.

Cheers!

User avatar
marsmen
 
Posts: 8
Joined: Fri May 31, 2019 2:34 am

Re: Pixy pet 2 robot code error

Post by marsmen »

This was one of the others that helped get things going:
https://dronebotworkshop.com/pixy2-camera/

User avatar
greenfrog6
 
Posts: 6
Joined: Thu Nov 21, 2019 12:09 am

Re: Pixy pet 2 robot code error

Post by greenfrog6 »

Thank you for letting me know what you’ve found! Sadly I purchased the robot for a science fair that already happened. I will still build the robot for though. Glad I didn’t completely waste my money!

User avatar
marsmen
 
Posts: 8
Joined: Fri May 31, 2019 2:34 am

Re: Pixy pet 2 robot code error

Post by marsmen »

Doh!

No! Your money wasn't wasted!

I literally had the exact same thing last quarter of school.

I was doing a "Sound to Light" with FFT for a "High Tech" Presentation. I decided go with the Adafruit FFT/Spectrum Analyzer Example.

Due to many things, I had to go with something else for a successful demo. After the quarter ended, I went back and got the FFT going.

It is brilliant.

Hopefully you can enter another science fair, or by next year, have played with the Pixy-Bot enough to maybe add some cool feature and use that as your entry.

Good Luck!

User avatar
greenfrog6
 
Posts: 6
Joined: Thu Nov 21, 2019 12:09 am

Re: Pixy pet 2 robot code error

Post by greenfrog6 »

Thanks a million! I will keep that in mind!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”