Go Down

Topic: receive serial data(ascii) coming from arduino and display it in vb6 text field (Read 772 times) previous topic - next topic


Hi all, I am trying to receive serial data(RFID tag id) from arduino and display the information in visual basic 6.0's textbox.Can anyone help me.
Thanks in advance.


I am trying to receive serial data(RFID tag id) from arduino

You must, therefore, have an Arduino running some code that sends data to the serial port. Too bad you didn't feel that showing that code was useful.

and display the information in visual basic 6.0's textbox.

You must, therefore, have a VB application that has a text box, some code to open the serial port, some code to read the serial data as it arrives, or after is has been buffered, and some code to copy that data to the text box. Too bad you didn't feel that showing that code was useful.

Can anyone help me.

Given what you've posted, help seems unlikely. Though perhaps you've now thought of something.


Good morning sir

My name is Fikri, I am a college student from Indonesia and currently doing my final project. My final project is about attendance system using arduino and rfid reader module. I have a problem which is similiar with this link http://forum.arduino.cc/index.php?topic=161862.msg1210263#msg1210263, all I need is for the text box in visual basic 6 to read my rfid id from arduino.

I have been browsing for couple a days and I dont really understand most of the solution, I already try some too and its not working in my case. May you help me please? I am really newbie in programming, and really appreciate if you can help me.

This is my Arduino code to read the id in decimal and only display the Id:

Code: [Select]

#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN 10
#define RST_PIN 9

MFRC522 rfid(SS_PIN, RST_PIN); // Instance of the class

MFRC522::MIFARE_Key key;

// Init array that will store new NUID
byte nuidPICC[3];

void setup() {
 SPI.begin(); // Init SPI bus
 rfid.PCD_Init(); // Init MFRC522

 for (byte i = 0; i < 6; i++) {
   key.keyByte[i] = 0xFF;

void loop() {

 // Look for new cards
 if ( ! rfid.PICC_IsNewCardPresent())

 // Verify if the NUID has been readed
 if ( ! rfid.PICC_ReadCardSerial())

 if (rfid.uid.uidByte[0]!= nuidPICC[0]||
   rfid.uid.uidByte[1]!= nuidPICC[1]||
   rfid.uid.uidByte[2]!= nuidPICC[2] ||
   rfid.uid.uidByte[3]!= nuidPICC[3] ) {
//    Serial.println();

   // Store NUID into nuidPICC array
   for (byte i = 0; i < 4; i++) {
     nuidPICC[i] = rfid.uid.uidByte[i];
   printDec(rfid.uid.uidByte, rfid.uid.size);
 else Serial.println(F("Card read previously."));

 // Halt PICC

 // Stop encryption on PCD

* Helper routine to dump a byte array as dec values to Serial.
void printDec(byte *buffer, byte bufferSize) {
 for (byte i = 0; i < bufferSize; i++) {
   Serial.print(buffer[i] < 0x10 ? "0" : "");
   Serial.print(buffer[i], DEC);
   Serial.print(" ");

My kind sir, I really appreciate if you can help me how to read that id from com4 to textbox in visual basic 6. Im sorry I dont have any code for the visual basic 6 project, as I just started. But sir, just a program with 1 textbox that can read my code from serial port is all I need.

Here is the screenshot from my arduino com, and all I want to do is to display the code to the textbox in visual basic 6. Thank you very much, have a nice day, and good luck for you to all everything that you do.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131