Tuesday 19 April 2016

Test programing




/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
 */

// Pin 3 has an LED connected on most Arduino boards.
// give it a name: TEST 1
int led = 3;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);    
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}


/* **********************************************************
TEST 2
***********************************************************







 /*
 Fade

 This example shows how to fade an LED on pin 3
 using the analogWrite() function.

 This example code is in the public domain.
 */

int led = 3;           // the pin that the LED is attached to
int brightness = 0;    // how bright the LED is
int fadeAmount = 5;    // how many points to fade the LED by

// the setup routine runs once when you press reset:
void setup()  {
  // declare pin 3 to be an output:
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop()  {
  // set the brightness of pin 3:
  analogWrite(led, brightness);  

  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade:
  if (brightness == 0 || brightness == 255) {
    fadeAmount = -fadeAmount ;
  }   
  // wait for 30 milliseconds to see the dimming effect  
  delay(30);                          
}


/* **********************************************************
TEST 3
***********************************************************

    
/*

14core LED Chase Effect with 14Core Stater Kit

*/

byte ledPin[] = {3, 5, 6, 9, 10}; // Define the pins on arduino
int ledDelay(10); // delay changes
int leddirection = 1;
int ledcurrentLED = 0;
int ledcount=5;
unsigned long changeTime;
 
void setup() {
  for (int x=0; x<ledcount; x++) {
    pinMode(ledPin[x], OUTPUT);
  } // set all pins to output
  changeTime = millis();
}


void loop() {
  if ((millis() - changeTime) > ledDelay) { // if it has been ledDelay ms since last change
    changeLED();
    changeTime = millis();
  }
}


// Increment Function to turn off all LED
void changeLED() {
   for (int x=0; x<ledcount; x++) {      // Increment x++
     digitalWrite(ledPin[x], LOW);
   }
  
   // OLD: digitalWrite(ledPin[ledcurrentLED], HIGH); // Turning on the current LED                   
   fadeon (ledPin[ledcurrentLED]);
  
  
  
   ledcurrentLED += leddirection; // increment the direction by value

    // changing the direction if we reach the last LED
    if (ledcurrentLED == ledcount-1) {leddirection = -1;}
    if (ledcurrentLED == 0) {leddirection = 1;}
         
}

// add on
void fadeon(int led) {
  int brightness = 0;    // how bright the LED is
  int fadeAmount = 5;    // how many points to fade the LED by

  while (brightness < 255){
      // set the brightness of pin 9:
      analogWrite(led, brightness);   

      // change the brightness for next time through the loop:
      brightness = brightness + fadeAmount;

      // reverse the direction of the fading at the ends of the fade:
      if (brightness == 0 || brightness == 255) {
        fadeAmount = -fadeAmount ;
        }    
      // wait for 30 milliseconds to see the dimming effect   
      delay(15);                           
    }
 
}

Tuesday 19 January 2016

New year, new surprises, new.......


Despite late, it still is January so brief thoughts of what has been happening:

2015 was a GREAT and busy year. 

Liisa and I had been so busy that it was hard to cope with this blog and finalize many projects we want to do.  We are lucky because we have a lot to do, but we need to learn to balance all.  However we must acknowledge a HUGE and outstanding improvement from 2014. Now, we gather constantly and other people is joining us. That is a HUGE improvement.:)

Other things important in 2015 are:
  • we meet Kirsi, she is a gem and we enjoy working with her! 
  • this year taught us the importance of our club for our community. We were contacted by different people, despite we are still working with the creation of F4E community. However, this 2015 also gave us clearer information of what several people need to put hands on. 

And 2016, will be a year full of surprises. We are making things happen and we go step by step. :)

The following photo is special for me of what 2016 will bring, as having a lovely 7 year old playing with it.

One step at the time!




===
F4E written by  Carolina Islas (CAIS)