Search found 117 matches

by ricardocrl
02 Nov 2012, 23:36
Forum: Mindstorms Software
Topic: [NXC] RotateMotor with speed regulation - How?
Replies: 3
Views: 4892

Re: [NXC] RotateMotor with speed regulation - How?

As currently implemented, all the RotateMotor API functions use REGMODE_SYNC even when you only control a single motor. I could change that so when you only use a single motor that it uses speed regulation instead of synchronization. John Hansen Hi John, sorry for the delay. That is probably a very...
by ricardocrl
28 Oct 2012, 20:29
Forum: Mindstorms Software
Topic: [NXC] RotateMotor with speed regulation - How?
Replies: 3
Views: 4892

[NXC] RotateMotor with speed regulation - How?

Hi everyone, When using RotateMotor, the speed is not regulated. Does anyone have an idea on how to make this happen? I found a way that works: OnFwdRegEx(motor, speed, OUT_REGMODE_SPEED, RESET_NONE); Wait(1); SetOutput(motor, TachoLimitField, angle, UpdateFlagsField, UF_UPDATE_TACHO_LIMIT); The onl...
by ricardocrl
13 Oct 2012, 17:08
Forum: Mindstorms Software
Topic: [NXC] How to set speed 0 (zero) during position regulation
Replies: 0
Views: 7858

[NXC] How to set speed 0 (zero) during position regulation

Hi, I would like to set a target position (with absolute position regulation), but I need to keep changing Speed over time, while reaching the target. Sometimes I need the speed to be zero, or motor stoped. If I do PosRegSetMax(OUT_X, 0, x), it will mean maximum velocity, while 1 means a very low ve...
by ricardocrl
01 Oct 2012, 20:57
Forum: Mindstorms Software
Topic: NXC array declaration
Replies: 15
Views: 14117

Re: NXC array declaration

The problem also exists without dimensions specified. I will then post my example. Maybe it is another problem, but also affecting the initialization. This is the code example: float myArray[][] = { {0.0, 1.0, 0.0}, {0.0, 0.5, 1.0} }; task main(void){ ClearScreen(); NumOut(0, LCD_LINE1, myArray[0][0...
by ricardocrl
30 Sep 2012, 20:17
Forum: Mindstorms Software
Topic: NXC array declaration
Replies: 15
Views: 14117

Re: NXC array declaration

I have NOT extended the array initialization changes to 2+ dimensional arrays or to structures at this point. This answered my couple of hours or more of debugging. :-) I tried to look for the right information and end up here: http://bricxcc.sourceforge.net/nbc/nxcdoc/nxcapi/arrays.html It says: A...
by ricardocrl
24 Sep 2012, 10:45
Forum: Mindstorms Software
Topic: Is it possible to change Atmega48 source code? How to?
Replies: 5
Views: 7161

Re: Is it possible to change Atmega48 source code? How to?

Thank you mattallen! It looks feasible and fun to try once at least. But I personally like more flexible/reusable solutions. I wouldn't like to have to do everything again if I change NXT by some reason. Just for curiosity, what I was planning to change is something that maybe others could need. It'...
by ricardocrl
22 Sep 2012, 22:22
Forum: Mindstorms Software
Topic: Is it possible to change Atmega48 source code? How to?
Replies: 5
Views: 7161

Re: Is it possible to change Atmega48 source code? How to?

Yes, I have the source code, and I have lost time deciding where and what to change before I came with the question "how to compile and flash". :-) I think in order to change the binary of the AtMega48 co processor in the NXT, you would need to use a JTAG (which would require opening the N...
by ricardocrl
22 Sep 2012, 18:09
Forum: Mindstorms Software
Topic: Is it possible to change Atmega48 source code? How to?
Replies: 5
Views: 7161

Is it possible to change Atmega48 source code? How to?

Hi,

I would like to change some code in the source code of the Atmega48.
I am using the IAR workbench, but as I understand, it uses compiled code for the Atmega48 and/or simply only flashes new Firmware to the main processor, is that right?

Thank you!
by ricardocrl
31 Mar 2012, 18:02
Forum: Mindstorms Software
Topic: NXC: set / change Brick name?
Replies: 35
Views: 30410

Re: NXC: set / change Brick name?

Brickdataneme has to return the correct name as it is, either how long it is, and just how long it is exactly . Why does it "has to"? It's all related with the firmware. When you call that function, the FW reads the full 16 bytes and returns them, without any further analysis. Of course t...
by ricardocrl
30 Mar 2012, 10:41
Forum: Mindstorms Software
Topic: Number indexing of structs
Replies: 6
Views: 17357

Re: Number indexing of structs

But does this make sense, conceptually? I mean, in C or C-like languages at least, I don't remember to have this possibility, if I understood what mattallen said.
You mean using the elements of a structure as if they were in an array?