Lighthouse Project

i want to make a lighthouse with set of 18 led’s around it. i want the led’s to appear like their rotating around like a real lighthouse light would. anyone have any idea what to use for this kind of project

Your lighthouse project would be a good use for shift registers. Look up the 74HC595. There are also shift register chips made to drive higher current loads, but since you are driving only one LED at a time the 595 should suit.

Or a single MAX7219.
If it’s really just 1 LED at a time, then a Promini with its 20 IO could handle that too. Leave 0/1 free for downloading code via FTDI Basic, use the rest.
Code something like this

byte pinArray[] = {19,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,}; // elements 0 to 18. 19 entered twice for wrap around from last  light to first.
byte x;
void setup(){
  for (x=0; x<19; x=x+1){
  pinMode(pinArray[x], OUTPUT);
digitalWrite (pinArray[18], HIGH); // turn on last LED
delay(1000); // leave on for 1 second

void loop(){
  for (x=1; x<19; x=x+1){
  digitalWrite (pinArray[x-1], LOW); // turn off prior LED - make this a fade down effect?
  digitalWrite (pinArray[x], HIGH); // turn on next LED - make this a fade up effect?
  delay(1000); // hold for 1 sec

ok i'm new to this what is a promini? I have a Arduino Uno is it a board i add on or something completely different? I dont mind getting something else if it works better?

Charlieplex! Only 5 Arduino outputs and 5 resistors needed…

Once you have the prototype working, you could move the sketch to an ATTiny85. This is a tiny & cheap chip! Use your Uno to program the 'tiny (using ArduinoISP sketch). Then you get your Uno back.


Typically you'd use your Uno and getting everything working, then if you want to get your Uno back you can replace it with the cheaper pro mini. Note: you need to use an external programmer with the pro mini (it has no USB port); a "pro micro" would not need an external programmer.