author2
19CommentsItaliaJoined May 5th, 2016
Sono un hobbista con la voglia di fare e imparare!
  • ferra1980 commented on thomasj152's instructable Ping Pong Ball LED Clock9 days ago
    Ping Pong Ball LED Clock

    #include <FastLED.h>#include <DS3232RTC.h>#include <TimeLib.h>#define LED_PIN 9 //pin connected to the led data cable#define NUM_LEDS 128 //numbers of led// Start mod button for time setting#define PORA 7 //pin connected to the hours button#define PMINUTI 8 //pin connected to the minutes button// end mod button for time setting// Start mod BRIGHTNESSconst int SensoreLuminositaPin = 14;int ValoreLuminosita; //The value read by the LDRint BRIGHTNESS;// end mod BRIGHTNESSDS3232RTC myRTC(false);tmElements_t tm;CRGB leds[NUM_LEDS];CHSV colour( 0, 255, 180);int counter=0, // Start mod button for time settingvalO=0, valM=0;// end mod button for time settingconst int Digits[10][10] ={ {7,8,10,11,14,18,22,24}, // Start mod Inversion of central LEDs for number 1 //{1...

    see more »

    #include <FastLED.h>#include <DS3232RTC.h>#include <TimeLib.h>#define LED_PIN 9 //pin connected to the led data cable#define NUM_LEDS 128 //numbers of led// Start mod button for time setting#define PORA 7 //pin connected to the hours button#define PMINUTI 8 //pin connected to the minutes button// end mod button for time setting// Start mod BRIGHTNESSconst int SensoreLuminositaPin = 14;int ValoreLuminosita; //The value read by the LDRint BRIGHTNESS;// end mod BRIGHTNESSDS3232RTC myRTC(false);tmElements_t tm;CRGB leds[NUM_LEDS];CHSV colour( 0, 255, 180);int counter=0, // Start mod button for time settingvalO=0, valM=0;// end mod button for time settingconst int Digits[10][10] ={ {7,8,10,11,14,18,22,24}, // Start mod Inversion of central LEDs for number 1 //{14,16,18,22,24}, {14,15,16,17,18}, // End mod Inversion of central LEDs for number 1 {7,8,9,11,14,16,18,24}, {7,9,11,14,16,18,22,24}, {9,10,11,16,18,22,24}, {7,9,10,11,14,16,18,22}, {7,8,9,14,15,16,18,22}, {7,11,14,16,17,24}, {7,8,9,10,11,14,16,18,22,24}, {7,9,10,11,14,16,17,24},};void setup(){ pinMode(17, OUTPUT); //ground and v5 for clock module pinMode(16, OUTPUT); // Start mod button for time setting pinMode(PORA, INPUT); // imposta il pin digitale come input pinMode(PMINUTI, INPUT); // imposta il pin digitale come input // end mod button for time setting digitalWrite(17, HIGH); digitalWrite(16, LOW); FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS); myRTC.begin();} //function that uses the Digit array to display numbers between 0 and 100void displaynumber( int place , int number){ for (int i = 0 ; i < 10 ; i++) { if (Digits[number/10][i] != 0) { leds[(Digits[number/10][i]+place)] = CRGB(255,255,255);; } if (Digits[number%10][i] != 0) { leds[(Digits[number%10][i]+28+place)] = CRGB(255,255,255);; } }}void loop(){ RTC.read(tm); // Start mod BRIGHTNESS ValoreLuminosita = analogRead(SensoreLuminositaPin); if ( ValoreLuminosita <= 30) { BRIGHTNESS = 5; } else { BRIGHTNESS = ValoreLuminosita/4; } FastLED.setBrightness( BRIGHTNESS ); // End mod BRIGHTNESS //changes the colour of background every 10 cycles if (counter<10){ counter++; }else{ colour.hue = (colour.hue+1)%256; counter=0; } // Start mod BRIGHTNESS if (ValoreLuminosita <= 30 ) { // if the brightness value is lower or equal to 30 then turn off the background LEDs for ( int i=0; i< 128;i++){ colour.hue = (colour.hue+1)%256; leds[i]= CRGB(0,0,0); } colour.hue = (colour.hue+128)%256; } else { // End mod BRIGHTNESS // sets background to rainbow colours for ( int i=0; i< 128;i++){ colour.hue = (colour.hue+1)%256; leds[i]= colour; } colour.hue = (colour.hue+128)%256; // Start mod BRIGHTNESS } // End mod BRIGHTNESS displaynumber(0,tm.Hour); displaynumber(70,tm.Minute); //display colons if ( tm.Second%2 == 0 ){ leds[64] = CRGB(255,255,255); leds[66] = CRGB(255,255,255); } FastLED.show(); // Start mod button for time setting valO = digitalRead(PORA); // reads the value of the input and store it in valO valM = digitalRead(PMINUTI); // reads the value of the input and store it in valM // here it creates a variable that becomes true if you change the hours or minutes bool tempoModificato = false; if (valO == HIGH) // if the hours button is pressed { if (tm.Hour == 23) // if the hour's value is 23 the increase brings it back to 00 { tm.Hour = 0 ; } else { tm.Hour++; // increases the time by one unit for all other starting hours } tempoModificato = true; } if (valM == HIGH) // if the minute button is pressed { if (tm.Minute == 59) // if the minute's value is 59 the increase brings it back to 00 { tm.Minute = 0 ; } else { tm.Minute++; // increases the minutes by one unit for all other initial minutes } tempoModificato = true; } // if you've changed the hours or minutes, update RTC and pause for 500 milliseconds if (tempoModificato) { RTC.write(tm); delay(500); } // End mod button for time setting}

    How can I add code to a reply?However, you have to connect one pin of the button to 5v, then connect the other to NANO pin and to GND adding a 10k ohm resistor to this last wire, look at the image as an example:

    View Instructable »
  • ferra1980 commented on thomasj152's instructable Ping Pong Ball LED Clock14 days ago
    Ping Pong Ball LED Clock

    I made a small change to set the time. I added a button to increase the time value and one to increase the value of the minutes. It's really simple but it works efficiently. I can share it if you want!I also added an LDR sensor this morning to adjust the brightness. But it's too sensitive, or some other problem, and the LEDs flicker at low brightness.

    Hi Thomas! Thanks! They are only two power supplies, the first in input 220v and 10A, 12v output while the second 12v in input and 5v, 10A in output. This is because I did not find a sufficiently thin power supply that would directly supply 5v, 10A from 220v. I know it could be assembled, but it was faster this way!

    View Instructable »
  • ferra1980 commented on thomasj152's instructable Ping Pong Ball LED Clock18 days ago
    Ping Pong Ball LED Clock

    I have put it all in the back panel!

    Hi Thomas, have you tried to upgrade your project with 2 buttons to set the clock or a LDR to set the brightness in relation to ambient light?

    View Instructable »
  • ferra1980 made the instructable Ping Pong Ball LED Clock20 days ago
    Ping Pong Ball LED Clock

    Un progetto davvero semplice, ma molto coreografico e appagante! Le prossime modifiche sono quelle di inserire dei pulsanti per la regolazione dell'ora e un sensore di luminosità per regolare l'intesità dei led, soprattutto al buio. Grazie thomasj152 per averlo condiviso!A really simple project, but very choreographic and rewarding! The next changes are to insert buttons for adjusting the time and a light sensor to adjust the intensity of the LEDs, especially in the dark. Thanks thomasj152 for sharing it!

    View Instructable »
  • ferra1980 commented on thomasj152's instructable Ping Pong Ball LED Clock5 weeks ago
    Ping Pong Ball LED Clock

    I think 128 led ws2812B absorb 7,04A at maximum. I will try to put the power supply in the back. I'll let you know! Thanks

    Great project Thomas! Congratulations.I really need to build one of this! I have a simple question, where did you put the "5V 10A power supply"? Isn't it too wide to place it in the back of the clock? Thanks

    View Instructable »
  • ferra1980 made the instructable Arduino Word Clock11 months ago
    Arduino Word Clock

    Thanks for your help! I have changed all the max7219 modules, now the problem has gone, maybe one of them was faulty. You are the best!

    View Instructable »
  • ferra1980 commented on oliverb's instructable Arduino Word Clock12 months ago
    Arduino Word Clock

    Hi Brett,I've made your hack, but yesterday between 7 pm and 9 pm "The Time Is" switched off. I have also changed the Aptotec Nano Pro V3.0 ATmega328P with IZOKEE Mini Nano V3.0 Module ATmega328P, with no results. I did not connect PIR module, the Buzzer, the summer / winter switch and the synch module, maybe this can conflict? Thanks for your help!

    View Instructable »
  • ferra1980 commented on oliverb's instructable Arduino Word Clock12 months ago
    Arduino Word Clock

    Thanks Oliver.Sorry for the question, but how I can do that?

    View Instructable »
  • ferra1980 commented on oliverb's instructable Arduino Word Clock1 year ago
    Arduino Word Clock

    Hi Brett,I'm back with the same problem. The first led line "the time" after some time switches off. I've tried to connect the wire to another led line and I saw it working for more tha a day. Do you have any idea? I'm using the 4.2 version. Do you think is possible to avoid the issue adding a total reset of led after a day?

    View Instructable »
  • ferra1980 commented on oliverb's instructable Arduino Word Clock1 year ago
    Arduino Word Clock

    It was a 5 volt PSU, but I found a problematic led, probably it was all starting from this dead led. I have changed it, now works fine! Thanks for your help!

    View Instructable »
  • ferra1980 commented on oliverb's instructable Arduino Word Clock1 year ago
    Arduino Word Clock

    I tried to power arduino NANO from USB and now everythings goes well! I don't know why but using a external power source i have this issue!

    View Instructable »
  • ferra1980 made the instructable Arduino Word Clock1 year ago
    Arduino Word Clock

    I have the same problem, after a few minutes i lose the words "THE TIME" and sometimes a letter in the sector 4. If I change the mode an I get back to Word Clock the words are correctly light. The strange thing is that in Digital Clock mode the leds are always lights up correctly

    View Instructable »
  • ferra1980 made the instructable Arduino Word Clock1 year ago
    Arduino Word Clock

    I have built the clock,I think the wire are really short but probably I can make they shorter, I attach the images of the wires..

    View Instructable »
  • ferra1980 commented on oliverb's instructable Arduino Word Clock1 year ago
    Arduino Word Clock

    Hi Oliver, I have another question. I have built the clock, but sometimes i lose a letter or the Arduino doesn't light up the right letter, if I refresh by the menu everithings goes ok. Is this because a use an "Aptotec Nano Pro V3.0 ATmega328P Development Board" instead of Arduino Nano?Thanks again!

    View Instructable »
  • ferra1980 followed oliverb1 year ago
      • Arduino Perpetual Calendar Clock
      • Arduino Pong Clock With Temperature and Timer
      • Arduino Quartz Clock Controller