Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6810759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:14:40+00:00 2026-05-26T20:14:40+00:00

I want to send data to my Arduino board using Visual Studio and C.

  • 0

I want to send data to my Arduino board using Visual Studio and C.
I specifically need to use C since I am using ARToolKit to get markers and sending the data accordingly.

I was trying the code

#include<stdio.h>
#include<stdlib.h>
void main()
{
    system( "MODE COM9: BAUD=9600 PARITY=n DATA=8 STOP=1" ) ;
    FILE port = fopen( "COM9:", "wb" ) ;
    printf("hello");
    fprintf( port, "s" ) ;
    fclose( port ) ;
}

but it is not getting compiled.

I just need to send data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:14:40+00:00Added an answer on May 26, 2026 at 8:14 pm

    I understood from your post that you need to send data using visual studio not to write a program to flash or any other stuff. Here is an example i made for you on my machine it works sending the text test.

    #include "stdafx.h"
    #include <Windows.h>
    #include <stdio.h>
    #include <conio.h>
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
        char test[] = "Hello";
    
        HANDLE hDevice = CreateFile(L"COM2",GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,OPEN_EXISTING,0,0);
    
        if (hDevice !=INVALID_HANDLE_VALUE)
        {
            printf("Port opened! \n");
            DCB lpTest;
            GetCommState(hDevice,&lpTest);
            lpTest.BaudRate = CBR_9600;
            lpTest.ByteSize = 8;
            lpTest.Parity = NOPARITY;
            lpTest.StopBits = ONESTOPBIT;
            SetCommState(hDevice,&lpTest);
    
            DWORD btsIO;
    
            WriteFile(hDevice,test,strlen(test),&btsIO,NULL);
    
            CloseHandle(hDevice);
        }
        _getch();
    
    
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to send arabic data from servlet using HTTPServletResponse to client i am
Hello Sir i want send list of data to php server i use following
I want to send data or packets at particular IP address using ANSI C
I just want to send data using ajax post request to a remote server.
I want to send the data I get in onLocationChanged() via tcp/ip. I can
I want to send data using ssl for data network Security when sending data
I want to send data between two applications by using JSON and Ajax. For
I want to send some data to an Arduino through pyserial in Python. All
I want to send some data using android app to Gsoap server. I am
Is it possible to send data to the server using POST? Ie) I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.