Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rosewater

Pages: 1
1
TinyLily / Re: Pinout documentation
« on: January 07, 2014, 09:30:53 PM »
In reply to wikkit, "pin 0 does not do anything". AFter lot of frustration and trial and error, I found out that pin 0 does actually work, but only if the tiny lily is powered externally from a battery, and not connected to to the USB of my computer.

Even trying Serial.end() does not disable serial mode if connected to the USB cable to computer.

2
TinyLily / Trouble identifying the pins
« on: August 14, 2013, 12:21:25 AM »
I am trying to figure out the pins on my TinyLily. I am new to electronics and this is my first Arduino, and I do not understand the PDF on the website.

I tried this sketch code below. I have an LED whose short leg (-) is grounded to negative pin on the TinyLily. I can move the longer (+) leg to any other pin on the TinyLily.

digitalWrite(2, HIGH) and digitalWrite(3, HIGH) light up the LED connected to pin 3 and 4 respectively on the board as expected.

But digitalWrite(1, x), where x can be HIGH or LOW, always causes LED on pin 1 to blink.

And digitalWrite(0, y), where y can be HIGH or LOW, also always causes the LED on pin 0 to blink, but this is slightly different from pin 1 such that it lights up, then dims, then lights up and so on, where as pin 1 blinks by lighting up and then turns off. Why does it dim and not turn off before lighting up again?

How can I get pin 0 and pin 1 to behave like pin 2 and 3?

Code: [Select]
void setup() {
  // put your setup code here, to run once:
  pinMode(0, OUTPUT);      // sets the digital pin as output
  pinMode(1, OUTPUT);      // sets the digital pin as output
  pinMode(2, OUTPUT);      // sets the digital pin as output
  pinMode(3, OUTPUT);      // sets the digital pin as output
  pinMode(4, OUTPUT);      // sets the digital pin as output
  pinMode(5, OUTPUT);      // sets the digital pin as output
  pinMode(6, OUTPUT);      // sets the digital pin as output
  pinMode(7, OUTPUT);      // sets the digital pin as output
}

void loop() {
  // put your main code here, to run repeatedly:
  //digitalWrite(0, HIGH);   // sets the LED on
  //digitalWrite(1, HIGH);    // sets the LED on
  //digitalWrite(2, HIGH);   // sets the LED on
  digitalWrite(3, HIGH);    // sets the LED on
  //digitalWrite(4, HIGH);    // sets the LED on
  //digitalWrite(5, HIGH);    // sets the LED on
  //digitalWrite(6, HIGH);    // sets the LED on
  //digitalWrite(7, HIGH);    // sets the LED on
   delay(200);    // waits for a second 
  digitalWrite(0, LOW);   // sets the LED off
  digitalWrite(1, LOW);    // sets the LED off
  digitalWrite(2, LOW);   // sets the LED off
  digitalWrite(3, LOW);    // sets the LED off
  digitalWrite(4, LOW);   // sets the LED off
  digitalWrite(5, LOW);    // sets the LED off
  digitalWrite(6, LOW);   // sets the LED off
  digitalWrite(7, LOW);    // sets the LED off
  delay(200);
}

Pages: 1
SMF spam blocked by CleanTalk