my code

Snippet options

Download: Download snippet as medidor-cpu-arduino.c.
Copy snippet: For this you need a free my code account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11 , 12);//Establecemos los puertos de salida digital
void setup()
  Serial.begin(9600); //Establecemos el ratio
  lcd.begin(16, 2); //Decimos que la pantalla es de 16x2
  lcd.setCursor(0,0);//Fijamos el primer caracter en el primera columna de la primera fila

void loop()
  int val;
  if (Serial.available())//Comprobamos que el puerto serial esté disponible
    delay(100);    //un pequeño delay para esperar la respuesta
    while  (Serial.available ()>0) //en caso de ser positiva la respuesta ejecuta el código
    {; //leemos el texto enviado desde la aplicacion de visual
      lcd.write(val);//Escribimos el texto en la pantalla
  lcd.setCursor(0, 0); //volvemos a setear el primer caracter en 0,0

Create a free my code account now.

my code is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.