Send data to Arduino

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
aortucre
Posts: 8
Joined: Thu Nov 19, 2015 1:12 pm

Send data to Arduino

Post by aortucre »

I've successfully been able to get to the window where you can view the 7 analog readings live. (3DxTest)

How can I feed this data live (wirelessly) to my Arduino. My final goal is to use all these analog inputs (which I believe it's 7 bytes of data for each reading) to control a 3 axis robotic arm that I'm putting together.

Is it even possible?

Thanks in advance!!
aortucre
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Send data to Arduino

Post by jwick »

You want to A) communicate wirelessly from a PC to the Arduino, or B) from the device wirelessly to the Arduino ?

A) You can tell the driver to use the protocol of your choice to communicate to the Arduino.
B) Our wireless devices need their nano receiver. They talk to the receiver; it talks to the USB port. You might be able to connect that to your Arduino device and read standard USB packets from there.
aortucre
Posts: 8
Joined: Thu Nov 19, 2015 1:12 pm

Re: Send data to Arduino

Post by aortucre »

Thank you jwick for your reply. Originally I was thinking of A)

I'm honestly not very well versed in the subject. Is there a tutorial or at least a direction that you could point me at in order to tell the driver to send it wirelessly to my board?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Send data to Arduino

Post by jwick »

The driver can call a DLL or invoke an executable each time it gets an event. There are samples on the forum about the specifics. The details don't matter at this time.

The hard part, I think, is to find a way to communicate wirelessly to the board. What are your options? Wifi? Bluetooth? I can't help you there.

Once you figure that out, I can show you how to get the device data to your communication code.
If the board has a USB port, I'd just use that. Or add one.

Frankly I'd use a cable first to get everything running downstream. The wireless communication will be isolated.

Google arduino spacenavigator to see what some people have already done.
aortucre
Posts: 8
Joined: Thu Nov 19, 2015 1:12 pm

Re: Send data to Arduino

Post by aortucre »

Perfect I agree. I can just begin using serial communication and then figure out the wireless option.

How can I modify the drivers to have them send data this way? (If it has already been explained in this forum and you'd be so kind as to show me where that'd be great too)

I've been unable to find a lot of other projects that used the Spacenavigator and Arduino together.
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Send data to Arduino

Post by jwick »

This seems like a simiar Arduino project to what you are proposing.
Perhaps he can share some code with you.

This thread contains some discussion of extensions.
You can either call an exe, or much simpler, create a DLL to call into. If you sign up as a developer, we can email you a sample DLL.
aortucre
Posts: 8
Joined: Thu Nov 19, 2015 1:12 pm

Re: Send data to Arduino

Post by aortucre »

I already contacted the author of that video (Korean). I received no answer but from the comments he said that the code still needed tweaking.

I've also found this video that I think you guys might like. Maybe you've already seen it.

https://www.youtube.com/watch?v=aBNj_St ... AerialDron

Regarding signing up as a developer. I've already filled out the application and received access to your SDK. Is that enough or I have to do something else?

Thanks again
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Send data to Arduino

Post by jwick »

The driver also has the ability to output joystick data. The AR Drone PC controller accepts joystick data. It's ok.
It needs two things:
1) You need to drive it from an onboard camera so you have a first person perspective. It's very difficult to drive it from a third person perspective. It's like trying to fly an airplane from the wing tip as soon as you rotate it. RC pilots are used to this but it is dumb when there is a simple solution.
2) It needs better control code. It needs to take into account how the drone flies. It has inertia. That needs to be taken into account.

If you are signed up as a developer, you can send an email to the support email on the developer page to ask for the code. I'll reply, if I am here.
aortucre
Posts: 8
Joined: Thu Nov 19, 2015 1:12 pm

Re: Send data to Arduino

Post by aortucre »

The drone was an example of somebody who was able to send wirelessly data from the Spacenavigator to the microcontroller.

Creating the wireless connection between my computer and the Arduino is fairly easy, but programming a protocol that will tell my computer to output the data it what is proving challenging.

Also, I don't even need to do it wirelessly for now, it can just be all done through USB since my project is not a drone but a robotic arm.
Post Reply