« STIC Discussion:STIC IV (2021)/Grand projet: Boite Binaire » : différence entre les versions

De EduTech Wiki
Aller à la navigation Aller à la recherche
Ligne 14 : Ligne 14 :


Jérôme
Jérôme
====Re: Re: liens circuits switch -- [[Utilisateur:Kalli|k. benetos]] ([[Discussion utilisateur:Kalli|discussion]]) 11 mai 2022 à 11:51 (CEST)====
J'ai trouvé cette réponse. J'en ai déjà entendu parler de la première. 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 [https://nootropicdesign.com/ez-expander/ 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.''

Version du 11 mai 2022 à 10:51

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. 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.