JoyState_t

JoyState_t

Postby M2RiverRat » Mon Feb 16, 2015 12:55 am

I am pretty familiar with Arduino UNO, I am having some issues with the JoyState_t though, I put the USBAPI.h and the USBCore.cpp and HID.cpp in the correct folder but, can't seem to get this to compile still.

I put the files in this location. C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino

follow sparkfuns good and I am receiving this error when I try to compile it.

Code: Select all
  Arduino: 1.6.0 (Windows 7), Board: "SparkFun Pro Micro 3.3V/8MHz"

DeltaThrottle.ino:2:1: error: 'JoyState_t' does not name a type
DeltaThrottle.ino: In function 'void setup()':
DeltaThrottle.ino:54:2: error: 'joySt' was not declared in this scope
DeltaThrottle.ino: In function 'void loop()':
DeltaThrottle.ino:196:3: error: 'joySt' was not declared in this scope
DeltaThrottle.ino:218:3: error: 'Joystick' was not declared in this scope
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.


Please help! =)
Last edited by M2RiverRat on Mon Feb 16, 2015 2:05 am, edited 1 time in total.
M2RiverRat
 
Posts: 19
Joined: Mon Feb 16, 2015 12:51 am

Re: JoyState_t

Postby M2RiverRat » Mon Feb 16, 2015 2:14 am

Continuing the adventure. I decided to try and put the files in the C:\Users\...\Arduino\hardware\sparkfun\avr\cores\arduino folder to see it would compile, started to compile then had a few more errors, not sure if this means anything.

Code: Select all
Arduino: 1.6.0 (Windows 7), Board: "SparkFun Pro Micro 3.3V/8MHz"

DeltaThrottle.cpp.o: In function `getForwardKinematic()':
/Arduino/DeltaThrottle.ino:111: undefined reference to `Serial'
/Arduino/DeltaThrottle.ino:111: undefined reference to `Serial'
/Arduino/DeltaThrottle.ino:112: undefined reference to `Serial'
/Arduino/DeltaThrottle.ino:112: undefined reference to `Serial'
/Arduino/DeltaThrottle.ino:113: undefined reference to `Serial'
DeltaThrottle.cpp.o:/Arduino/DeltaThrottle.ino:113: more undefined references to `Serial' follow
DeltaThrottle.cpp.o: In function `setup':
/Arduino/DeltaThrottle.ino:45: undefined reference to `Serial_::begin(unsigned long)'
DeltaThrottle.cpp.o: In function `loop':
/Arduino/DeltaThrottle.ino:203: undefined reference to `Serial'
/Arduino/DeltaThrottle.ino:203: undefined reference to `Serial'
/Arduino/DeltaThrottle.ino:204: undefined reference to `Serial'
/Arduino/DeltaThrottle.ino:204: undefined reference to `Serial'
/Arduino/DeltaThrottle.ino:205: undefined reference to `Serial'
DeltaThrottle.cpp.o:/Arduino/DeltaThrottle.ino:205: more undefined references to `Serial' follow
DeltaThrottle.cpp.o: In function `loop':
/Arduino/DeltaThrottle.ino:218: undefined reference to `Joystick'
/Arduino/DeltaThrottle.ino:218: undefined reference to `Joystick'
/Arduino/DeltaThrottle.ino:218: undefined reference to `Joystick_::setState(JoyState*)'
C:\Users\****-~1\AppData\Local\Temp\build5714182469938737666.tmp/core.a(USBCore.cpp.o): In function `SendInterfaces()':
C:\Users\******\Documents\Arduino\hardware\sparkfun\avr\cores\arduino\backup/USBCore.cpp:452: undefined reference to `CDC_GetInterface(unsigned char*)'
C:\Users\********-~1\AppData\Local\Temp\build5714182469938737666.tmp/core.a(USBCore.cpp.o): In function `ClassInterfaceRequest':
C:\Users\********-********\Documents\Arduino\hardware\sparkfun\avr\cores\arduino\backup/USBCore.cpp:370: undefined reference to `CDC_Setup(Setup&)'
collect2: error: ld returned 1 exit status
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.



Looking forward to using this any help will be appreciated!
M2RiverRat
 
Posts: 19
Joined: Mon Feb 16, 2015 12:51 am

Re: JoyState_t

Postby M2RiverRat » Mon Feb 16, 2015 2:59 am

Okay, this will be my last post. I moved the original files out and manage to get it to start to compile.
Here is the error I got now.

Code: Select all
Arduino: 1.6.0 (Windows 7), Board: "SparkFun Pro Micro 3.3V/8MHz"

C:\Users\********\Documents\Arduino\hardware\sparkfun\avr\cores\arduino\HID.cpp:19:22: fatal error: Platform.h: No such file or directory
 #include "Platform.h"
                      ^
compilation terminated.
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.



This seems to me to be in the HID.cpp folder, I don't know why it isn't reading the platform library. Now I am getting into an area I am not so comfortable with.

Again, any help will be great!
M2RiverRat
 
Posts: 19
Joined: Mon Feb 16, 2015 12:51 am

Re: JoyState_t

Postby M2RiverRat » Mon Feb 16, 2015 3:47 am

OKAY!!! So, you can NOT use the newest version you have to use 1.0.6!!

follow this guide but use the older version.
https://learn.sparkfun.com/tutorials/pr ... okup-guide

This is the one he linked in the build guide, so ya, just use the 1.0.6, the newest one just doesn't read libraries correctly yet.
M2RiverRat
 
Posts: 19
Joined: Mon Feb 16, 2015 12:51 am

Re: JoyState_t

Postby zdayton » Tue Feb 17, 2015 3:33 am

It sounds like you got it working then? I will have to check which version I am on, but thank you for posting the fix. Are you just working in software or do you have hardware as well?
zdayton
Site Admin
 
Posts: 81
Joined: Wed Dec 24, 2014 6:20 am

Re: JoyState_t

Postby jeruw » Tue Feb 17, 2015 5:26 pm

Curious after reading this. I opted for a different Arduino board for my build and picked up one of these: http://www.amazon.com/gp/product/B00761 ... UTF8&psc=1

This will be my first time working with Arduino, so forgive the newbie question. Given the issues presented above, do you expect I'll have problems compiling the sketch for the different hardware? I sort of assumed that it should work fine, but now I'm wondering if I'll need to do some futzing or if the sparkfun board had more going for it than it's size? I purchased the nano board instead because of it's cheaper price, the fact it has headers already installed (no soldering required on the board itself for wire hookups), and the USB plug looked to be more secure (I saw a complaint that the sparkfun's plug felt flimsy). The nano is bigger at 1.7" long compared to 1.3". I placed a 3d model in the base and it looks like it should still fit. I'll probably try mounting it with standoffs to raise it over the pivot mounts for more clearance.
jeruw
 
Posts: 80
Joined: Tue Feb 17, 2015 3:10 pm

Re: JoyState_t

Postby zdayton » Wed Feb 18, 2015 3:11 am

It looks like the board you got on Amazon has an ATmega328 on it, which does not have a USB controller on it. I don't think you will be able to get it working on that board. The chip has to be the Atmel ATmega32U4.
zdayton
Site Admin
 
Posts: 81
Joined: Wed Dec 24, 2014 6:20 am

Re: JoyState_t

Postby jeruw » Wed Feb 18, 2015 4:32 am

Thanks for the heads up. I guess I assumed that with the built in USB interface it was going to be fine. Thankfully they surprisingly hadn't fulfilled the order yet so I was able to cancel. Going to try this as an alternative - http://www.ebay.com/itm/321663308761

Looks to be similar to the sparkfun and have the correct chip. I'll let you know how it goes. If it doesn't work out I'll just go ahead and order a sparkfun board and find some other use for these :).

I assume the comment about the version to use above referred to the Arduino IDE, correct? I downloaded it this afternoon.
jeruw
 
Posts: 80
Joined: Tue Feb 17, 2015 3:10 pm

Re: JoyState_t

Postby M2RiverRat » Sat Feb 21, 2015 8:47 am

I'm a mechanical engineer student, so i play around with this stuff often. =)
M2RiverRat
 
Posts: 19
Joined: Mon Feb 16, 2015 12:51 am

Re: JoyState_t

Postby M2RiverRat » Sat Feb 21, 2015 8:48 pm

Pretty sure Sparkfun is the only ones that make the board you need.

https://www.sparkfun.com/products/12587

a teensy may work but it is the same price as the pro micro.

They said it was back ordered I got it a week later.

Good luck
M2RiverRat
 
Posts: 19
Joined: Mon Feb 16, 2015 12:51 am


Return to Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron