User Tools

Site Tools


digispark:tutorials:basics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
digispark:tutorials:basics [2013/08/25 21:55]
w4krl [Analog Read:] fix pin number for Analog 2
digispark:tutorials:basics [2016/06/09 12:03] (current)
Line 87: Line 87:
 void setup() { void setup() {
     //P0, P1, and P4 are capable of hardware PWM (analogWrite).     //P0, P1, and P4 are capable of hardware PWM (analogWrite).
-    pinMode(0, OUTPUT); //0 is P0, 1 is P1, 4 is P4 - unlike the analog/inputs,  +    pinMode(0, OUTPUT); //0 is P0, 1 is P1, 4 is P4 - unlike the analog inputs,  
-                        //for analog (PWM) outputs the pin number matches.+                        //for analog (PWM) outputs the pin number matches ​the port number.
 } }
  
digispark/tutorials/basics.txt · Last modified: 2016/06/09 12:03 (external edit)