Soo i want to do a classification table for my school and i did it but only changeable by visual basic and i tried to make it changeable by internet but i cant do it because i have no knowledge in HTML etc
i am using arduino uno and ethernet shield
index is the website i tried to do looking for tutorials
the arduino code
and the visual basic:
Imports System
Imports System.IO.Ports
Public Class Form1
Dim WithEvents serialPort As New IO.Ports.SerialPort
Dim T1, T2, T3, T4, T5, T6, T7, T8, TURMAS, PONTOS As String
Dim T1P, T2P, T3P, T4P, T5P, T6P, T7P, T8P As String
Private Sub LigacaoSerie()
If serialPort.IsOpen Then
serialPort.Close()
Panel2.BackColor = Color.Red
Else
Try
With serialPort
.PortName = ComboBox25.Text
.BaudRate = TextBox10.Text
.Encoding = System.Text.Encoding.ASCII
.NewLine = Chr(13) + Chr(10)
End With
serialPort.Open()
serialPort.DiscardInBuffer()
Panel2.BackColor = Color.LightGreen
Catch ex As Exception
End Try
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
LigacaoSerie()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Panel2.BackColor = Color.Red
' Declare Ports
Dim Ports As String() = IO.Ports.SerialPort.GetPortNames()
' Add port name Into a comboBox control
For Each Port In Ports
ComboBox25.Items.Add(Port)
Next Port
' Select an item in the combobox
ComboBox25.SelectedIndex = 0
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
serialPort.Write("%")
Catch ex As Exception
End Try
T1 = ComboBox1.SelectedIndex.ToString + ComboBox2.SelectedIndex.ToString + ComboBox3.SelectedIndex.ToString
T2 = ComboBox6.SelectedIndex.ToString + ComboBox5.SelectedIndex.ToString + ComboBox4.SelectedIndex.ToString
T3 = ComboBox9.SelectedIndex.ToString + ComboBox8.SelectedIndex.ToString + ComboBox7.SelectedIndex.ToString
T4 = ComboBox18.SelectedIndex.ToString + ComboBox17.SelectedIndex.ToString + ComboBox16.SelectedIndex.ToString
T5 = ComboBox15.SelectedIndex.ToString + ComboBox14.SelectedIndex.ToString + ComboBox13.SelectedIndex.ToString
T6 = ComboBox12.SelectedIndex.ToString + ComboBox11.SelectedIndex.ToString + ComboBox10.SelectedIndex.ToString
T7 = ComboBox24.SelectedIndex.ToString + ComboBox23.SelectedIndex.ToString + ComboBox22.SelectedIndex.ToString
T8 = ComboBox21.SelectedIndex.ToString + ComboBox20.SelectedIndex.ToString + ComboBox19.SelectedIndex.ToString
TURMAS = "-" + T1 + "-" + T2 + "-" + T3 + "-" + T4 + "-" + T5 + "-" + T6 + "-" + T7 + "-" + T8
T1P = TextBox1.Text
T2P = TextBox2.Text
T3P = TextBox3.Text
T4P = TextBox6.Text
T5P = TextBox5.Text
T6P = TextBox4.Text
T7P = TextBox8.Text
T8P = TextBox7.Text
PONTOS = "-" + T1P + "-" + T2P + "-" + T3P + "-" + T4P + "-" + T5P + "-" + T6P + "-" + T7P + "-" + T8P
Try
serialPort.Write(TURMAS)
serialPort.Write("*")
Catch ex As Exception
End Try
Try
serialPort.Write(PONTOS)
serialPort.Write("/")
MsgBox("Enviado")
Catch ex As Exception
MsgBox("Porta Serie nao conectada")
End Try
End Sub
End Class
i hope someone can help with this ![]()
Codigo_final_infra_vb.ino (25.4 KB)