STIC Discussion:STIC IV (2021)/Grand projet: Boite Binaire

De EduTech Wiki
Aller à la navigation Aller à la recherche

liens circuits switch -- k. benetos (discussion) 3 mai 2022 à 21:39 (CEST)

Voilà un circuit Tinkercad j'ai recomposé à partir d'un sketch avec boutons poussoirs. J'ai aussi trouvé ceci dans une discussion forum qui peut aider.

Et encore un step-by-step mais il faut remplacer les boutons par des switchs.

Re: liens circuits switch -- JeromeHumbert (discussion) 11 mai 2022 à 11:13 (CEST)

Merci beaucoup Kalli !

Petite question, je pense ne pas avoir assez d'emplacement sur mon arduino pour pouvoir faire les switchs (12 emplacements) et le 4 digit display (12 emplacements). Comment me conseilles-tu de procéder ? Est-ce qu'il y a une extension possible ? Ou un deuxième arduino ?

Merci d'avance !

Jérôme

Re: Re: liens circuits switch -- k. benetos (discussion) 11 mai 2022 à 11:51 (CEST)

J'ai trouvé cette réponse. J'en ai déjà entendu parler de la première. Apparement il suffit de les renommer, "call them Pin 14 to Pin 19 and they will work like digital ones.". Combien te faut-il?

There are two ways you can get more pins out of an arduino.

The first way is by using the Analog pins as digital output pins, which is really easy to do. All you need to do is refer to A0-A5 as pins 14,15,16,17,18,19. For example to write high to pin A0 just use digitalWrite(14, HIGH).

The other way to get more pins out of the Arduino is by using a Shift Register. To do this I recommend using the EZ-Expander Shield, which allows you to use digitalWrite([20-35], HIGH) when you import the EZ-Expander Library. This shield however only allows the pins to be used as outputs only and uses pins 8,12 and 13 to control the shift registers.

The great thing is, is that you can use both of the two methods above together, without any problems.

Re: Re: Re: liens circuits switch -- JeromeHumbert (discussion) 11 mai 2022 à 12:45 (CEST)

En tout 24 du coup c'est juste pas assez sur un seul arduino même avec ta technique secrète ;).

Montage avec le 4 digit.png

1- Un circuit que j'ai trouvé utilisant le 4 digit

Montage switchs.png














2- Mon circuit fonctionnel avec les switchs.

Du coup ta deuxième solution peut être la bonne ! Est-ce que t'en as un en stock ?