Trinket and TSL2561 (Light Sensor)

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Ritzy
 
Posts: 2
Joined: Fri Jun 13, 2014 9:36 am

Trinket and TSL2561 (Light Sensor)

Post by Ritzy »

I'm trying to migrate a project from an Uno to the trinket. It's just a simple project I'm doing with my son to measure light and illuminate an LED. The trinket seems perfect, but I'm having trouble migrating my Uno code to the Trinket. Sorry for the newbie question, but I assume that even though I'm using the Arduino IDE, that I'll need different libraries that support USBtinyISP? Is that correct?

Go easy on me. We're just getting started, and are both excited about "inventing" some stuff this summer.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Trinket and TSL2561 (Light Sensor)

Post by adafruit_support_rick »

Not sure what you're asking. USBtinyISP is only used for actually programming the Trinket.
Some libraries will need to be modified for Trinket, but others will work as-is.

What exactly is it you're having trouble with?

Ritzy
 
Posts: 2
Joined: Fri Jun 13, 2014 9:36 am

Re: Trinket and TSL2561 (Light Sensor)

Post by Ritzy »

I'm receiving all sorts of compiler errors when trying to put my code on the Trinket. It works fine on the Uno. I assumed that the issue was with the libraries I'm using as simple code to flash the LED works fine, thus the question as to whether the Trinket (TinyUSBIsp) required special code/libraries.

In my project, the libraries I am trying to use are:
Wire.h
Adafruit_Sensor.h
Adafruit_TSL2561_U.h

I did see a "TinyWireMaster" library for the trinket that might replace Wire.h? I'm not seeing anything for the Sensor and TSL2561.

Has anyone written code that works with the Trinket and the TSL2561?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Trinket and TSL2561 (Light Sensor)

Post by adafruit_support_rick »

Those are libraries that need to be ported. You can use TinyWireM, but the other two need to be modified to work with TinyWireM. Offhand, I'm not sure what that involves. It's probably not difficult.

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

Return to “USBtinyISP”