I need a code

Hi all,
I am building a project (for fun) and would like to include some basic electronics.
I am building a toy holding a parcel with a smile on his face using an array of led's, but when someone takes it off the led's will change colour or to a different configuration like angry. I was thinking of using reed switch and a magnet inside the parcel.

Can someone help me writing a code please? I am quite new to coding :frowning:

Your help will be greatly appreciated :smiley:

Can someone help me writing a code please?

Not without some requirements and definitive hardware and some compensation.

I have arduino uno.

in simple tems..... when switch is on LED 1 is on....when switch is off LED 2 turns on

hope this helps

If you want to write the code yourself we will try to help you. There are many examples with the Arduino IDE to get your learning process started.

If you want someone else to write the code for you then you should ask in the Gigs and collaborations section and expect to pay.

...R

thanks Robin

Will try :slight_smile:

I need code, is that the new song of Pharrell?

gefkots:
in simple tems..... when switch is on LED 1 is on....when switch is off LED 2 turns on

Uhm, sounds like you need no Arduino at all... Just a switch with normal open and a normal closed contact...

septillion:
Uhm, sounds like you need no Arduino at all... Just a switch with normal open and a normal closed contact...

Or one reed switch (normally open), a transistor, a few resistors.

It can be done without Arduino but it may also be being done for learning. In that case it may be used to turn the happy face smile to an inverted smile when parcel removed.

This involves reading a switch, turning on and off some LEDs and a sequence. All fairly simple.

If OP comes back with a simple program attempting to do this, we can help debug if required.

Weedpharma

Micro switches usually have double poles that could probably do the job without an arduino.

zoomkat:
Micro switches usually have double poles that could probably do the job without an arduino.

Double throw?

Weedpharma

weedpharma:
Double throw?

Weedpharma

That would be my guess.

Double throw?

One of these: