wishlist for NXC
Re: wishlist for NXC
for a terminal connection one would probably need a host (like a PC) but I never use any host, all I'm doing is for autonomous running.
But for that a real keyboard would be fine to have (a commercial adapter PS/2 to i2c at best).
(admittedly OT as it is no NXC wish)
But for that a real keyboard would be fine to have (a commercial adapter PS/2 to i2c at best).
(admittedly OT as it is no NXC wish)
Re: wishlist for NXC
I suppose this can be done with messages, with a program receiving messages posted by the NXT program.pepijndevos wrote:What Matt said(I think). One thing I really liked about pbLua is the terminal connection. Direct commands are nice, but limited. I wonder if it can be done with NBC hacking, or needs a special firmware.
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
Re: wishlist for NXC
BricxCC recently added a terminal window. I just need to add support for the NXT to this terminal window and then it will read and display whatever is sent by the NXT out its active connection (either USB or Bluetooth). Currently the terminal window only works with the HiTechnic SuperPro board.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: wishlist for NXC
~ John, I saw that, and that's what gave me hope you would add NXT support to it
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: wishlist for NXC
would it be possible to have ButtonPressed just with 1 parameter like
while(ButtonPressed (BTNLEFT));
having always to add true or false is too much to write and it's enough to read the related button state.
while(ButtonPressed (BTNLEFT));
having always to add true or false is too much to write and it's enough to read the related button state.
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: wishlist for NXC
Like my Buttons library?
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: wishlist for NXC
Code: Select all
#define btn(b) ButtonPressed(b, false)
edit2:
my btn lib:
Code: Select all
/******************************************************************************/
#define btn(b) ButtonPressed(b, false)
/******************************************************************************/
/******************************************************************************/
inline bool btnhit(){ // test if any btn is hit
/******************************************************************************/
char test;
test=( ButtonPressed(BTN1, false) || ButtonPressed(BTN2, false)
|| ButtonPressed(BTN3, false) || ButtonPressed(BTN4, false));
return test;
}
/******************************************************************************/
inline char btnin() { // read btn continuously (like cin <iostream>)
/******************************************************************************/
char result = -1;
if (ButtonPressed(BTNCENTER, false))
result = BTNCENTER;
else if (ButtonPressed(BTNEXIT, false))
result = BTNEXIT;
else if (ButtonPressed(BTNLEFT, false))
result = BTNLEFT;
else if (ButtonPressed(BTNRIGHT, false))
result = BTNRIGHT;
return result;
}
Re: wishlist for NXC
I would really love to have a new, more stable BlueTooth protocol.
The fw-integrated version is just a mess: it often hangs, blocks, and drops messages - it's simply frustrating, sometimes it works, then it failes intermediately, then it works again, unreliable as anything.
The new protocol should be multithreading-safe for indpendend send to/receive from mailboxes of different NXT BT clients and should have integrated error checking (fast but simple, e.g. by checksums).
It should be possible to poll by the master all remote sensors and control all remote motors by similar commands like we have for the local I/Os.
The fw-integrated version is just a mess: it often hangs, blocks, and drops messages - it's simply frustrating, sometimes it works, then it failes intermediately, then it works again, unreliable as anything.
The new protocol should be multithreading-safe for indpendend send to/receive from mailboxes of different NXT BT clients and should have integrated error checking (fast but simple, e.g. by checksums).
It should be possible to poll by the master all remote sensors and control all remote motors by similar commands like we have for the local I/Os.
-
- Posts: 220
- Joined: 23 Jan 2012, 17:07
- Location: Round Rock, TX
Re: wishlist for NXC
I picked up your little library and really like the Bump(). Saves a lot of typing on my part.mattallen37 wrote:Like my Buttons library?
McSummation aka James
http://www.mcsummation.com/Mindstorms/
http://www.mcsummation.com/Mindstorms/
Re: wishlist for NXC
looking for support for code like
Code: Select all
int turn;
string s;
task main() {
s=turn==8?"white":"black";
printf("test1: %s", s);
wait(2000);
ClearScreen();
printf("test2: %s", turn==8?"white":"black");
while(1);
}
Last edited by HaWe on 17 Oct 2012, 15:59, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 4 guests