Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: How to add customized compiling message under Arduino IDE on: January 02, 2013, 11:17:15 pm
It works!
Thanks for your help.

Steve
2  Using Arduino / Programming Questions / How to add customized compiling message under Arduino IDE on: January 02, 2013, 10:57:11 pm
Hi All,
I want to add some customized output information in Arduino IDE when compiling the code written by me.
I tried #pragma message("hello"). It dispalyed nothing.
Can anybody know it?

Thanks,

Steve
3  Topics / Robotics / Re: Build your own robot on: December 14, 2012, 02:08:14 am
Thanks a lot. The project has achived half of the goal.
4  Topics / Robotics / Re: Build your own robot on: December 12, 2012, 09:01:15 pm
Yes, most importantly Makeblock is a open source platform, and Arduino compatible. It's easy and hackable. You may get more information on their website: http://www.makeblock.cc/

5  Topics / Robotics / Build your own robot on: December 12, 2012, 02:44:30 am
Are you wanting to build your own robot, but without necessary material?
You may have a look at this new robot building platform:http://www.kickstarter.com/projects/1397854503/makeblock-next-generation-of-construct-platform.
Cool stuff!

6  Using Arduino / Programming Questions / Re: Using Servo variable as a member variable of my new Servo lib doesn't work on: December 10, 2012, 08:13:03 am
Got it.
Thank you so much, PaulS.

7  Using Arduino / Programming Questions / Using Servo variable as a member variable of my new Servo lib doesn't work on: December 10, 2012, 05:59:19 am
Hi all,
I want to write a new Servo Class for my project. It needs to wrap the Servo Class provided by Arduino library.  It doesn't work, as there's no driving signal output. Here's my code.
I'd be appreciate if you can give a hand. ( I use Duemilanove 328,  Arduino 1.0.2 IDE, on Win7)

My_ServoDriver_test.h
Code:
class My_ServoDriver_test
{
public:
My_ServoDriver_test();
My_ServoDriver_test(int portNum);
//pos: 0 -180
void setServoPosition(int pos);

public:
Servo servo;
};

My_ServoDriver_test.cpp
Code:
#include "My_ServoDriver_test.h"

My_ServoDriver_test::My_ServoDriver_test()
{


}

My_ServoDriver_test::My_ServoDriver_test(int portNum)
{

servo.attach(portNum);

}

void My_ServoDriver_test::setServoPosition(int pos)
{
servo.write(pos);
}

TestServoDriver.ino
Code:
#include <My_ServoDriver_test.h>
#include <Servo.h>

My_ServoDriver_test servoDriver(11);


void setup()
{
//Serial.begin(9600);
//servoDriver.servo.attach(11);
}

void loop()
{
  servoDriver.setServoPosition(0);
  delay(1000);
  servoDriver.setServoPosition(180);
  delay(1000);

}

If I comment the "servo.attach(portNum); " in the "My_ServoDriver_test::My_ServoDriver_test(int portNum)", and use "servoDriver.servo.attach(11);" in setup(), it works.

Pages: [1]