issue88:arduino
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue88:arduino [2014/10/30 16:43] – créée andre_domenech | issue88:arduino [2015/01/22 15:38] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | This month, it’s time to combine two chunks of code into one, but this time with a broader view. These two parts will form a larger beast in the coming months. | + | **This month, it’s time to combine two chunks of code into one, but this time with a broader view. These two parts will form a larger beast in the coming months. |
I mentioned the 16x2 LCD screen in a previous Arduino section in FCM, but I haven’t mentioned the 3x4 keypad that I have. It’s a bog standard, no name, 3x4 keypad, with holes in its board for wires. I’ve soldered in some wires of various colours and it’s ready to be bolted onto the LCD screen. | I mentioned the 16x2 LCD screen in a previous Arduino section in FCM, but I haven’t mentioned the 3x4 keypad that I have. It’s a bog standard, no name, 3x4 keypad, with holes in its board for wires. I’ve soldered in some wires of various colours and it’s ready to be bolted onto the LCD screen. | ||
- | I already have my LCD screen wired up to the breadboard and have the basic ‘hello world’ sketch running on it, so I know for sure my LCD part is right. I’ve previously tinkered with the keypad and monitored the output in the serial window (code shown below) but now it’s time to bypass the serial window and go right to the LCD screen. | + | I already have my LCD screen wired up to the breadboard and have the basic ‘hello world’ sketch running on it, so I know for sure my LCD part is right. I’ve previously tinkered with the keypad and monitored the output in the serial window (code shown below) but now it’s time to bypass the serial window and go right to the LCD screen.** |
- | So, I have the keypad wired into the remaining digital pins and need to merge the two lots of code. Note that I’ve missed out digital pin 1. For some reason when I used pin 1, I would end up with a row of keys that wouldn’t output. I’m not entirely sure why. I have to assume it’s to do with pin 1 being the TX, or transmit, pin. | + | Ce mois-ci, le moment est venu de combiner deux morceaux de code en un, mais cette fois-ci avec une plus large perspective. Ces deux parties vont former une grosse bête dans les mois prochains. |
+ | |||
+ | J'ai fait état de l' | ||
+ | |||
+ | J' | ||
+ | |||
+ | **So, I have the keypad wired into the remaining digital pins and need to merge the two lots of code. Note that I’ve missed out digital pin 1. For some reason when I used pin 1, I would end up with a row of keys that wouldn’t output. I’m not entirely sure why. I have to assume it’s to do with pin 1 being the TX, or transmit, pin. | ||
Getting it working was pretty simple. I pasted in the include and keypad setup stuff at the start followed by editing the keypad pin numbers accordingly. In the original LCD code it printed ‘hello world’ in the top line then, below that, the time it’d been running in milliseconds. I replaced the ‘hello world’ text with ‘Enter code:’ and replaced the milliseconds with the key char. That was basically it. | Getting it working was pretty simple. I pasted in the include and keypad setup stuff at the start followed by editing the keypad pin numbers accordingly. In the original LCD code it printed ‘hello world’ in the top line then, below that, the time it’d been running in milliseconds. I replaced the ‘hello world’ text with ‘Enter code:’ and replaced the milliseconds with the key char. That was basically it. | ||
Ligne 11: | Ligne 17: | ||
My code is at: http:// | My code is at: http:// | ||
- | Next month, we’ll add more to the code, possibly more to the circuit too. Although, I’m quickly running out of pins! I have only the analog pins left. | + | Next month, we’ll add more to the code, possibly more to the circuit too. Although, I’m quickly running out of pins! I have only the analog pins left.** |
+ | |||
+ | Ainsi, le clavier est câblé aux contacts numériques restants et j'ai besoin de fusionner les deux morceaux de code. Notez que j'ai laissé de côté le contact numérique n° 1. Pour une raison quelconque, quand j' | ||
+ | |||
+ | Le faire fonctionner a été très simple. J'ai collé les lignes de code d' | ||
+ | |||
+ | Mon code est sur : http:// | ||
+ | |||
+ | Le mois prochain, nous rajouterons du code, probablement plus au circuit aussi. Bien que je vais être rapidement à cours de contacts ! Il ne me reste plus que les contacts analogiques. |
issue88/arduino.1414683796.txt.gz · Dernière modification : 2014/10/30 16:43 de andre_domenech