Jump to content

Archived

This topic is now archived and is closed to further replies.

thedutch

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

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

Share this post


Link to post
Share on other sites

I'd like to eventually work in the raw C myself, but the addon is pretty good

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

I'm working in C, working on code while waiting for my ducky to come so I can test it.

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...