Last active
December 3, 2019 20:33
-
-
Save fvilante/89ebaeddcf7f084490aa07255a83ff20 to your computer and use it in GitHub Desktop.
LCD Hitach em HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
PASSOS P/ RODAR ESTE CODIGO: | |
1. Abra o link: https://www.w3schools.com/js/tryit.asp?filename=tryjs_while | |
2. Copie e cole este codigo na pagina que vc abriu | |
3. Clique no botao "RUN" (cor verde) | |
4. Ajuste o tamanho da janela para melhor visualizacao do display | |
Read more: https://html.com/tags/comment-tag/#ixzz5cDw2ZjOY | |
--> | |
<!DOCTYPE HTML> | |
<html> | |
<body> | |
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | |
<script src="https://cdn.jsdelivr.net/npm/char-lcd"></script> | |
<h1 id="myHeader">Hello World!</h1> | |
<button onclick="displayResult()">Change text</button> | |
<div class="w3-container"> | |
<h1>Using w3-margin</h1> | |
<div class="w3-border"> | |
<div class="w3-container w3-margin w3-green"> | |
<p>The w3-margin class adds 16px margin to all sides of an element.</p> | |
<div id=lcd></div> | |
</div> | |
</div> | |
</div> | |
<script> | |
var lcd = new CharLCD({ at: 'lcd', rows: 2, cols: 40, rom: 'eu' }); | |
lcd.text(0, 0, " *** MENU PRINCIPAL **** "); | |
lcd.text(1, 0, " Posijet Industria e Comercio "); | |
function displayResult() { | |
document.getElementById("myHeader").innerHTML = "Have a nice day!"; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment