Trinket keyboard tutorial

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jackv
 
Posts: 25
Joined: Sat Dec 22, 2012 3:57 pm

Trinket keyboard tutorial

Post by jackv »

When i tried to compile the program I get the following warning:
In file included from /root/sketchbook/libraries/TrinketKeyboard/usbdrvasm_includer.S:24:
/root/sketchbook/libraries/TrinketKeyboard/usbdrv/usbdrvasm.S:17:1: warning: "__SFR_OFFSET" redefined
In file included from /home/jack/arduino-1.0.5/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/include/avr/io.h:99,
from /root/sketchbook/libraries/TrinketKeyboard/cmdline_defs.h:26,
from /root/sketchbook/libraries/TrinketKeyboard/usbdrvasm_includer.S:22:
/home/jack/arduino-1.0.5/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/include/avr/sfr_defs.h:141:1: warning: this is the location of the previous definition
Binary sketch size: 3,454 bytes (of a 5,310 byte maximum)
I am using Ubuntu 13.04 64 bit.

Thank you

User avatar
schnee72
 
Posts: 46
Joined: Fri Sep 04, 2009 7:40 pm

Re: Trinket keyboard tutorial

Post by schnee72 »

You are trying to compile as root, you probably don't have the libraries installed in the root's location.

You might find it easier to go ahead and set up your environment to be able to run the arduino ide as your regular user.

I've explained how to communicate with the Trinket as the regular user several posts such as this one:

http://forums.adafruit.com/viewtopic.php?f=52&t=43947

It will involve setting up a custom udev rule.

It isn't usually good to run GUI programs as root, as you can see you get problems such as this one, and even worse.

User avatar
frank26080115
 
Posts: 126
Joined: Fri Jun 15, 2007 1:04 am

Re: Trinket keyboard tutorial

Post by frank26080115 »

They are just warnings, and these particular warnings are safe to ignore.

I haven't figured out how to get rid of them yet, and it's not a high priority to fix.

User avatar
jackv
 
Posts: 25
Joined: Sat Dec 22, 2012 3:57 pm

Re: Trinket keyboard tutorial

Post by jackv »

The libraries are in /root/sketchbook/libraries, see first line of the message.

The program doesn't run.

User avatar
schnee72
 
Posts: 46
Joined: Fri Sep 04, 2009 7:40 pm

Re: Trinket keyboard tutorial

Post by schnee72 »

I'll stand by the idea that you'll have better luck not running arduino as root.

User avatar
frank26080115
 
Posts: 126
Joined: Fri Jun 15, 2007 1:04 am

Re: Trinket keyboard tutorial

Post by frank26080115 »

jackv wrote:The program doesn't run.
Did it enumerate? Can you get some lsusb output?

User avatar
jackv
 
Posts: 25
Joined: Sat Dec 22, 2012 3:57 pm

Re: Trinket keyboard tutorial

Post by jackv »

No, no sign of any output.

Sorry It took so long to get back to you.

User avatar
jackv
 
Posts: 25
Joined: Sat Dec 22, 2012 3:57 pm

Re: Trinket keyboard tutorial

Post by jackv »

twolf - I applied the udev rule so I don't have to be root. It still doesn't work.

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

Return to “Trinket ATTiny, Trinket M0”