Codigo C#: Using Using Using Namespace Public Partial Class New Public
Codigo C#: Using Using Using Namespace Public Partial Class New Public
Codigo C#: Using Using Using Namespace Public Partial Class New Public
using System;
using System.Windows.Forms;
using System.IO.Ports;
namespace App_Binario
{
public partial class Form1 : Form
{
SerialPort sp = new SerialPort();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
sp.PortName = "COM3";
sp.BaudRate = 9600;
sp.DataBits = 8;
sp.Open();
Codigo Arduino
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// initialize the serial communications:
Serial.begin(9600);
}
void loop() {
// when characters arrive over the serial port...
if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}
Materiales utilizados
Arduino UNO
Protoboard
Resistencia variable de 5k
Resistencia de 330Ohm de ¼ w