Hi,
I'm very new to arduino and digispark, and am working on a simple lamp project using an LED strip and a digispark. I have the prototype working with my arduino UNO, but am having difficulty transferring it over to the digispark. I think the problem is coming down to the types of pins I'm using on the digispark, which is all a bit out of my depth. I've downloaded the chip schematics for both in an attempt to compare and properly transfer over my wiring, but I have no idea what I'm looking at. Also, debugging with the digispark is difficult since I can't use the serial monitor.
I have two capacitive rods and an LED strip, and I'm trying to adjust the brightness of the LED strip using the rods as buttons for increasing and decreasing the brightness.
It looks like one other user has had the same issues, but resolved them here:
http://digistump.com/board/index.php/topic,1403.msg6441.html#msg6441I've tried the pins gogol suggested but still have no luck. My digispark is acting very strange, ie. detecting the capacitance change every second, instead of continuously. Basically I'm lost.
I'm using the CapacitiveSensor library (
http://playground.arduino.cc/Main/CapacitiveSensor), and have wired the sensors like this (only 2 sensors total):

and finally, here is my code:
#include <CapacitiveSensor.h>
#include <Adafruit_NeoPixel.h>
const int numSensors = 2;
const int inputPins[] = {4, 1};
int leftRod = 0;
int rightRod = 0;
int brightness = 10;
int PIN = 3;
CapacitiveSensor *sensors[2];
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
for (int i = 0; i < numSensors; ++i) {
sensors[i] = new CapacitiveSensor(2, inputPins[i]);
}
strip.setBrightness(255);
pinMode(PIN, OUTPUT);
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
brightness = loadTimings();
lampColor(brightness);
}
float loadTimings() {
leftRod = sensors[0]->capacitiveSensor(3);
rightRod = sensors[1]->capacitiveSensor(3);
if (leftRod>20){
brightness+=5;
}
if (rightRod>20){
brightness-=5;
}
if (brightness<10) brightness=10;
if (brightness>255) brightness=255;
return brightness;
}
int lampColor(float brightness){
float ratio=brightness/255;
float red = ratio*255;
float green = ratio*100;
float blue = ratio*60;
for (int i=0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, red, green, blue);
}
strip.show();
}I apologize for the huge amount of information, I'm trying to provide every detail I can. I'm so close to finishing my first project but have hit this wall and appreciate any help

Thanks!
Alex