Search found 17 matches

by chanyh
08 May 2011, 10:19
Forum: Mindstorms Software
Topic: Statements about LEGO lamp brick for NXC
Replies: 8
Views: 10303

Re: Statements about LEGO lamp brick for NXC

Hi, Matt,

Thanks!

I use the commands that you suggested. It works.

YH Chan.
by chanyh
08 May 2011, 09:00
Forum: Mindstorms Software
Topic: Statements about LEGO lamp brick for NXC
Replies: 8
Views: 10303

Re: Statements about LEGO lamp brick for NXC

From the the LEGO Mindstorms website, one can download a Lamp* block in the package of Legacy_Blocks. This block can control a lamp.

I want to control the lamp by NXC statements.

YH Chan.
by chanyh
08 May 2011, 08:29
Forum: Mindstorms Software
Topic: Statements about LEGO lamp brick for NXC
Replies: 8
Views: 10303

Re: Statements about LEGO lamp brick for NXC

The lamp brick is the Electric, Light Brick 1 x 2 with Single Top Light.

The URL link is : http://www.bricklink.com/catalogItem.asp?P=4767

YH Chan
by chanyh
08 May 2011, 07:58
Forum: Mindstorms Software
Topic: Statements about LEGO lamp brick for NXC
Replies: 8
Views: 10303

Re: Statements about LEGO Light Brick for NXC

Matt, Sorry! I mean the LEGO lamp brick, not the NXT Light Sensor or old RCX Light Sensor. I try to use the following program, but no affect. task main() { while(true) { SetSensorType(OUT_A, SENSOR_TYPE_LIGHT_ACTIVE); //Turn on the light Wait(1000); SetSensorType(OUT_A, SENSOR_TYPE_LIGHT_INACTIVE);/...
by chanyh
08 May 2011, 05:29
Forum: Mindstorms Software
Topic: Statements about LEGO lamp brick for NXC
Replies: 8
Views: 10303

Statements about LEGO lamp brick for NXC

Help!

What are the NXC statements for the LEGO lamp brick? How to control the functions such as on, off or blinking?

I cannot find these statements in the NXC Programmer's Guide.

YH Chan
by chanyh
11 Jan 2011, 16:30
Forum: Mindstorms Software
Topic: Sort Color Bricks Problem
Replies: 1
Views: 3182

Sort Color Bricks Problem

I want to write a NXC program to sort 4 color bricks (Blue, Green, Red and Yellow) by a Lego Color Sensor into relevant color baskets. There are 4 empty color baskets (Blue, Green, Red and Yellow) to be fixed in a moving train which is controlled by M1. The train moves, to and fro, to collect a colo...
by chanyh
28 Dec 2010, 03:22
Forum: Mindstorms Software
Topic: PSP-Nx v3 Button Problem
Replies: 9
Views: 9945

Re: PSP-Nx v3 Button Problem

Matt, muntoo,

Thanks!

YH Chan.
by chanyh
27 Dec 2010, 10:07
Forum: Mindstorms Software
Topic: PSP-Nx v3 Button Problem
Replies: 9
Views: 9945

Re: PSP-Nx v3 Button Problem

Hi, Matt,

What are the meanings of the statements "B2=b2*(-1)+255;" and "B1=b1*(-1)+255;" and their purposes?

What are the values of the buttons in the PSP controller?

Can you help explain?


YH Chan
by chanyh
30 Nov 2010, 07:45
Forum: Mindstorms Software
Topic: Button
Replies: 5
Views: 6389

Re: Button

Hi, Mattallen, What is the difference between "(0 == ButtonCount(BTNCENTER,true)) " and "(ButtonCount(BTNCENTER,true)==0)"? In the following program, If the statement "while (0 == ButtonCount(BTNCENTER,true))" is replaced by "while (ButtonCount(BTNCENTER,true)==0) ...
by chanyh
30 Nov 2010, 06:24
Forum: Mindstorms Software
Topic: Button
Replies: 5
Views: 6389

Button

What is the meaning of the statement " (0 == ButtonCount(BTNCENTER,true)) "? What is its purpose in the following program? ................................................................... while (0 == ButtonCount(BTNCENTER,true)) { if (ButtonCount(BTNLEFT,true) && N > 0) { N--; }...