Allumer une lumière, ou 10. Arduino contrôle sur la série

This is something I use all the time, so I figured I would share it with you. Controlling an Arduino over serial can be extremely simple if you let it, and extremely useful if you know how to use it. Many languages such as Processing et ActionScript 3 (with a proxy) have ways to communicate over serial, and typically you see people using this so they can display the output of an Arduino, or use firmata to send information to the arduino but end up loosing a lot of programming space and overcomplicating the arduino side. But, you can go the other way and build interfaces that are able to control the arduino without firmata and pretty easily at that. Turn on a light, or 10. Arduino control over serial

This may sound totally obvious, and it may be, but I’m going to show you anyways. For this example I’m going to use the serial monitor built in to the Arduino software, but you can use anything that will write serial to the Arduino. And, although I’m only showing the hookup for LEDs, bildr is all about simple things that you can easily expand / change to make something really cool. So, not to leave you out in the cold, I’ll talk about next steps and how you could expand on this in a bit.

Keeping it simple

Sending a long serial string in Arduino is super simple ( Serial.print(“Hello”) ) , but reading one is a little more difficult. To simplify things, the commands we will send to the Arduino will all be single character. It may sound limiting, but you have 100 or so usable single characters (about 200 if you use special characters) so you can call that many functions over serial in like 3 lines of code. Later in the article, I will also use the single character calls as an advantage other than just saving coding time.Schematic Turn on a light, or 10. Arduino control over serial

For more detail: Allumer une lumière, ou 10. Arduino contrôle sur la série


A Propos De L'Auteur

Ibrar Ayyub

Je suis expérimenté, rédacteur technique, titulaire d'une Maîtrise en informatique de BZU Multan, Pakistan à l'Université. Avec un arrière-plan couvrant diverses industries, notamment en matière de domotique et de l'ingénierie, j'ai perfectionné mes compétences dans la rédaction claire et concise du contenu. Compétent en tirant parti de l'infographie et des diagrammes, je m'efforce de simplifier des concepts complexes pour les lecteurs. Ma force réside dans une recherche approfondie et de présenter l'information de façon structurée et logique format.

Suivez-Nous:
LinkedinTwitter

Laisser un Commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

fr_FRFrench
Faire défiler vers le Haut