Arduino Nano sketches for LED animation help

LimeyBuilds

Member
Alright, that's easier. So you start with all the lights on. You press the button and they turn off in sequence. They stay off... then you press the button and they all come on and stay on until the button is pressed again. I'll think about it and put something together.
That is perfect. I'm about to try putting pins on this beetle board!
 

13doctorwho

Sr Member
RPF PREMIUM MEMBER
Here is the tested code for the Nano. Starts with all the lights on. When you press the button they turn off in sequence. Another press of the button and all the lights come on. After that another press the LEDs start turning off in sequence. This repeats with button pressing in a continuous loop. I need to read up on the beetle board to see how to port this code over to that.
 

Attachments

  • LimeyBuilds_Alternate_Sketch.zip
    188.5 KB · Views: 11

LimeyBuilds

Member
Here is the tested code for the Nano. Starts with all the lights on. When you press the button they turn off in sequence. Another press of the button and all the lights come on. After that another press the LEDs start turning off in sequence. This repeats with button pressing in a continuous loop. I need to read up on the beetle board to see how to port this code over to that.
Man you are a wizard. If you ever want a 3D print model in my collection let me know!
 

13doctorwho

Sr Member
RPF PREMIUM MEMBER
I looked at the datasheet on the beetle. I've fixed the code so it will work. I changed some pin numbers to make it work with the beetle. I do not have a beetle, so I can't test this new code. Please note, the beetle needs to be run on +4.5 to+5V, it won't run on anything else. +6V will damage the processor. Let me know how it works on the beetle, I'm really curious. I might want to try the beetle for a few projects myself!!

DEVICE BEETLE PIN
LED1 A0
LED2 D9
LED3 D10
LED4 D11
Switch A1
 

Attachments

  • LimeyBuilds_Beetle_Sketch.zip
    827 bytes · Views: 10

LimeyBuilds

Member
I looked at the datasheet on the beetle. I've fixed the code so it will work. I changed some pin numbers to make it work with the beetle. I do not have a beetle, so I can't test this new code. Please note, the beetle needs to be run on +4.5 to+5V, it won't run on anything else. +6V will damage the processor. Let me know how it works on the beetle, I'm really curious. I might want to try the beetle for a few projects myself!!

DEVICE BEETLE PIN
LED1 A0
LED2 D9
LED3 D10
LED4 D11
Switch A1
I will try it tomorrow. I am running it on 3xAAA batteries, so perfect! Same with the nano previously. Thanks and i'll let you know
 

LimeyBuilds

Member
I looked at the datasheet on the beetle. I've fixed the code so it will work. I changed some pin numbers to make it work with the beetle. I do not have a beetle, so I can't test this new code. Please note, the beetle needs to be run on +4.5 to+5V, it won't run on anything else. +6V will damage the processor. Let me know how it works on the beetle, I'm really curious. I might want to try the beetle for a few projects myself!!

DEVICE BEETLE PIN
LED1 A0
LED2 D9
LED3 D10
LED4 D11
Switch A1
I couldn't wait. Worked first time! You're a genius.



DFR0282 Beetle Pin Layout.jpg
 

QuinnMallory

New Member
I never knew they made a microcontroller that small. That's cool. If you go down the rabbit hole on this stuff, you will find you can recreate an arduino on your own pcb design and get rid of the separate board altogether.

What prop are you making by the way?
 

LimeyBuilds

Member
I never knew they made a microcontroller that small. That's cool. If you go down the rabbit hole on this stuff, you will find you can recreate an arduino on your own pcb design and get rid of the separate board altogether.

What prop are you making by the way?
The SNW medical Hypo:

dsc-propvid-02.jpg

?hash=6444da6746a77e28037eda130591dde3.jpg
IMG_20220618_191901.jpg
 

Attachments

  • WIP1.jpg
    WIP1.jpg
    156.6 KB · Views: 4

Your message may be considered spam for the following reasons:

  1. Your new thread title is very short, and likely is unhelpful.
  2. Your reply is very short and likely does not add anything to the thread.
  3. Your reply is very long and likely does not add anything to the thread.
  4. It is very likely that it does not need any further discussion and thus bumping it serves no purpose.
  5. Your message is mostly quotes or spoilers.
  6. Your reply has occurred very quickly after a previous reply and likely does not add anything to the thread.
  7. This thread is locked.
Top