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

  • Home
  • SEARCH
  • 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 8045385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:31:49+00:00 2026-06-05T05:31:49+00:00

For school I’m building a robot, which needs to be able to detect lines

  • 0

For school I’m building a robot, which needs to be able to detect lines using 3 QRE1113 linesensors. (http://www.sparkfun.com/products/9454) I created 4 libraries, two for driving (Motor() & Driver()) they work fine. Now I created the libraries Linesensor and Eye, these are causing some trouble. When I want to use these libraries, the setup() function won’t do squad. Not even turn a LED on. What seems to be the problem?

Main file:

#include "Motor.h"
#include "Driver.h"
#include "Lichtsensor.h"
#include "Eye.h"

Motor motor1(5, 4, true);
Motor motor2(6, 7, false);
Driver driver(motor1, motor2);
Eye eye1;

void setup(){
  pinMode(13, OUTPUT);
  digitalWrite(13, HIGH);
  Serial.begin(9600);
  Serial.println("#################################################");
  Serial.println("# This sketch communicates with the arduino and #");
  Serial.println("# makes the robot drive, and react to a sensor. #");
  Serial.println("#################################################\n");
}

void loop(){
  if (eye1.getDikkeLijn() == true) {
      Serial.println("Lijn");
    }
   else {
     Serial.println("Niks");
   }
  delay(1000);
}

Eye library:

/*
Controls Lichtsensors
*/
#ifndef Eye_h
#define Eye_h

#include "Arduino.h"
#include "Lichtsensor.h"

class Eye 
    public:
    Eye();
    Eye(Lichtsensor l1, Lichtsensor l2, Lichtsensor l3);
    boolean getDikkeLijn();
    boolean getDunneLijn();
private:
    Lichtsensor _l1;
    Lichtsensor _l2;
    Lichtsensor _l3;
};

#endif

And the linesensor:

/*
Library to get values from a light sensor
*/
#ifndef Lichtsensor_h
#define Lichtsensor_h

#include "Arduino.h"

class Lichtsensor {
public:
    Lichtsensor();
    Lichtsensor(int analogPin);
    int getCalibreerWaarde();
    int getLichtWaarde();
    boolean isDonker();
private:
    int _lichtCalibreerWaarde;
    int _analogPin;
};

#endif
  • 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-06-05T05:31:51+00:00Added an answer on June 5, 2026 at 5:31 am

    It looks like we had too many classes and the arduino couldn’t handle it anymore.

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

Sidebar

Related Questions

A school project has me writing a Date game in C++ (example at http://www.cut-the-knot.org/Curriculum/Games/Date.shtml
For a school project, I'm building an application using PreferenceScreen s as a framework.
I have a school project in which I have to implement a chat application,
I am a high school student and am thinking of making a robot that
For school, we use C++ as the language of choice. I am currently using
I saw in school a system that set permissions using binary string. Let's say
I have a school project, for which I want to develop a web application
I work for a school district in which the teachers submit their lesson plans
At school we have been using a bootstrap program to run stand-alone programs without
My school is offering both GPU and HPC in Spring. I am confused which

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.