Jump to content

[Version 1] I Have A Teensy, Now What?


thedutch

Recommended Posts

So, when I first heard about the "ducky project" i decided to order a teensy right away. I got it in mail yesterday. I did some experimenting with it and i was able to get it (on a mac) to move the cursor to the upper right corner and make a click (made that by editing the PJRC usb:mouse example code: http://www.pjrc.com/teensy/usb_mouse.html). However i do not get it to type anything. When I try to compile it I get loads of errors. I've seen that "Seshan" has posted some code he made on the forum: http://www.hak5.org/forums/index.php?showtopic=16386

I don't get it to work because i don't know anything about C. Can someone please tell me what files are included and what definitions are used? Or please post the entire code somewhere?

Thnks,

thedutch

Edited by thedutch
Link to comment
Share on other sites

Pretty much everyone on the forums is using the Teensyduino plug in.

http://www.pjrc.com/teensy/teensyduino.html

It includes all the files you need to get it to work.

Who are you to speak for the majority forum? lol

I will be using C, once I start developing in the next few days.

OP, what compile errors are you getting?

Link to comment
Share on other sites

Who are you to speak for the majority forum? lol

I will be using C, once I start developing in the next few days.

OP, what compile errors are you getting?

Every code example I've seen has been in Teensyduino, not C.

He asked why it wasn't working, and I told him.

Link to comment
Share on other sites

Would you believe the "arduino language" is actually just C++? It's true. Ok, there is just a tiny bit of preprocessing which tries to make function prototypes for you automatically, and includes an extra header to automatically define all those easy-to-use library functions, but otherwise everything you type is just going right into gcc (g++ actually).

When you write Keyboard.print(), "Keyboard" is just a C++ object, which inherits the "print" method from a base printing class, where Keyboard provides the low-level I/O to send the bytes as HID keyboard events instead.

Nobody actually tell most Arduino users this, because C++ scares them, but they're coding in C++ anyways!

But the Arduino text is rather rather lame.

When I try to compile it I get loads of errors.

Of all the forums I'd expect to see someone complain about error messages but not actually copy the actual message.....

another hint -- try ALSO posting the actual code you're compiling, and maybe while you're at it mention which operating system and version of the software you're using!

Link to comment
Share on other sites

Thanks a million guys! :D

I was able to run the code made by "seshan" succesfully. The arduino software and the teensyduino plugin did the trick. Why i didn't post the compiler errors i got or the C code was because i already suspected that i was doing something fundamentally different than others.

Now let the fun begin!

Thanks again! B)

Edited by thedutch
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...