Search found 29 matches

by nxtboy
04 Feb 2012, 17:14
Forum: Mindstorms Software
Topic: Optional function parameters
Replies: 9
Views: 8828

Re: Optional function parameters

Does this work?

Code: Select all

int TEMP = 2;

int add(int x, int y, int &d_result = TEMP){
  d_result = (x+y)*2;
  return d_result/2;
}
If not, http://stackoverflow.com/questions/1059 ... rence-in-c is relevant
by nxtboy
21 Mar 2011, 21:54
Forum: Open Discussion
Topic: StackExchange proposal merges
Replies: 3
Views: 6316

"Electronics and Robotics" has dropped "Robotics"

The Electronics and Robotics recently graduated into a full-blown site, and in doing so, dropped the "Robotics" from its title. As a result, a merge is now irrelevant, so we should focus on the original proposal.
by nxtboy
17 Dec 2010, 22:12
Forum: Mindstorms Projects
Topic: Extremely cool course at University of Cambridge
Replies: 10
Views: 16862

Re: Extremely cool course at University of Cambridge

I so nearly got to try out that course as a pilot, but they refused me on grounds of me being a year too young.
by nxtboy
17 Dec 2010, 22:07
Forum: Mindstorms Projects
Topic: Omni-wheel balancing robot
Replies: 39
Views: 38201

Re: Omni-wheel balancing robot

I'm thinking of a kind of omniwheeled self balancing bot. Basically I want to place my robot on top of a football. It should be able to maintain it's position without falling of. Kinda an inverse of xkcd #413 , right? I do have an accelerometer that measures over three axes. Can this be used in a s...
by nxtboy
17 Dec 2010, 21:59
Forum: Mindstorms Projects
Topic: NXT Games
Replies: 26
Views: 39105

Re: NXT Games

Don't forget my Pacman!
by nxtboy
17 Dec 2010, 21:41
Forum: Mindstorms Software
Topic: Displaying an analog clock
Replies: 7
Views: 8898

Re: Displaying an analog clock

Is this within a RIC file?

If not, just use trigonometry!

I'm a getting bit shaky with my NXC now, so here's some pseudo-code:

Code: Select all

int xCenter = 50;
int yCenter = 32;
int radius = 20;
float angle = Pi/6 * hour;
drawLine(xCenter, yCenter, xCenter + radius * sin(angle), yCenter + radius * cos(angle));
by nxtboy
09 Dec 2010, 20:35
Forum: Mindstorms Hardware
Topic: All New Rotacaster's Omni-wheels to Test Drive!
Replies: 16
Views: 24745

Re: All New Rotacaster's Omni-wheels to Test Drive!

Ooh, I really need to get hold of some of those so that I can replace the wheels from http://holonomicwheel.com on my Robocup Junior robots ¹. We had a lot of problems with traction last time, and the wheels tended to jitter. How hard do you reckon it would be to modify the inset so that the wheels...
by nxtboy
23 Nov 2010, 15:35
Forum: Mindstorms Hardware
Topic: Using the ultrasonic sensor with other controllers
Replies: 22
Views: 25278

Re: Using the ultrasonic sensor with other controllers

Presumably that means that the pullup resistors can't be the cause of the problem? Actually, it means that it is all the more likely to be the cause of your sensor fate, because the resistors were in parallel, so the values combined would be less than 2.2k, which is yet even lower. Oh yeah, good po...
by nxtboy
22 Nov 2010, 21:06
Forum: Mindstorms Hardware
Topic: Using the ultrasonic sensor with other controllers
Replies: 22
Views: 25278

Re: Using the ultrasonic sensor with other controllers

Also, you noted that you used 2k2 pullups. Why such low values? The NXT uses 82k, and unless you are going into insane speeds, 10k should be the lowest value you will ever need (for non NXT stuff). If you really did mess up (or "burn out") the sensor, it is likely because the pullups are ...
by nxtboy
21 Nov 2010, 14:46
Forum: Mindstorms Hardware
Topic: Using the ultrasonic sensor with other controllers
Replies: 22
Views: 25278

Re: Using the ultrasonic sensor with other controllers

according to the colors and voltages, maybe this could help: Pins-and colors : (danke an sebi!) Sensor: Pin1 White ANA Analog Pin2 Black GND (-) Pin3 Red GND (-) pin4 Green +4,3V Pin5 Yellow SCL (digital, I²C: Serial CLock Line) Pin6 Blue SDA (digital, I²C: Serial DAta Line) Motor: Pin1 White Mot...