Author Topic: new to using digispark pins  (Read 2335 times)

andrewxd

  • Newbie
  • *
  • Posts: 1
new to using digispark pins
« on: September 27, 2017, 01:48:35 pm »
I want to use my digispark to control an LED with a digital pin, and read a photoresistor using an analog pin. The circuit works fine on an arduino uno, but when I use my digispark, I run into problems. I think the problem might be that the pins all have many functions, but after trying to use many different combinations of pins, I couldn't seem to get it to work. Any advice on using pins/getting them to function properly?

Pin 0 → I2C SDA, PWM (LED on Model B)
Pin 1 → PWM (LED on Model A)
Pin 2 → I2C SCK, Analog
Pin 3 → Analog In (also used for USB+ when USB is in use)
Pin 4 → PWM, Analog (also used for USB- when USB is in use)
Pin 5 → Analog In

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: new to using digispark pins
« Reply #1 on: September 27, 2017, 11:15:27 pm »
I assume you read this primer in the Digispark Wiki.. http://digistump.com/wiki/digispark/tutorials/basics

Beyond that you really don't provide any detail on what didn't work, sketch and how your circuit (led and photoresistor) is hooked up.