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 4580216
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:45:07+00:00 2026-05-21T20:45:07+00:00

I am trying to get an LED connected to a serial port to light

  • 0

I am trying to get an LED connected to a serial port to light up. I have followed a step-by-step tutorial which can be found here. I have followed the directions exactly but cannot get the code to compile. From the PDF guide, it is part 2 which does not compile, which I reproduce here:

//<Set serial port parameters>

  DCB dcbSerialParams = {0};
  dcbSerial.DCBlength=sizeof(dcbSerialParams);
  if (!GetCommState(hSerial, &dcbSerialParams))
  {
  //error getting state
  }
  dcbSerialParams.BaudRate=CBR_19200;
  dcbSerialParams.ByteSize=8;
  dcbSerialParams.StopBits=ONESTOPBIT;
  dcbSerialParams.Parity=NOPARITY;
  if(!SetCommState(hSerial, &dcbSerialParams))
  {
  //error setting serial port state
  }

//</Set serial port parameters>

I have included in the code as specified, but I receive the error message “`dcbSerial’ undeclared (first use this function)”. I am using Dev-C++.

Essentially all I am trying to do is get a command which flashes the LED on and off, which I can put into another program I have (an eye tracking device – the idea is to get the LED to flash when your eyes are looking at it).

Any help very much appreciated.

  • 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-21T20:45:08+00:00Added an answer on May 21, 2026 at 8:45 pm

    Replace dcbSerial with dcbSerialParams.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't seem to get the camera LED to light up as a flashlight
So i am trying get 2 div-containers which both should contain centered text (Both
Trying to get this expression to work, can someone look at it and tell
Here is the code I have. I'm trying to do a string comparison. A
I've been trying to get CUDA/OpenCL running on my windows system. I can get
I have a little sample application I was working on trying to get some
I was trying to populate a drop down list in a view which led
I have been trying to write a script where I can post data to
We have an MU (Multisite) installation of Drupal7 here at work, and are trying
I'm a newbie here and have found some of the material really useful. However,

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.