To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 24385
24384  |  24386
Subject: 
Re: Rotating through a four-bit nibble
Newsgroups: 
lugnet.robotics
Date: 
Thu, 22 Sep 2005 15:22:36 GMT
Viewed: 
1484 times
  
In lugnet.robotics, Kevin L. Clague wrote:

Since I didn't really complete the assignment I'll try again.

   Both your 1st & 2nd solutions are very good; thanks to you and other posters
to this thread for giving me a much better handle on binary manipulations, and
solutions to this problem. In answer to an earlier question, speed is important
(simple (ie- no loop) maze solving for a line-follower), but so is size because
this program is getting long fast. I'd like an entry for the ChiBots event which
is a maze of 7x7 potential nodes, so bit representations for some things are
going to save some variable space. As well as being a more "natural" way of
doing it.

I confirmed that even SDK v2.5 does not have shifts
or rotates

   I guess I shouldn't have been too surprised by this - after all, it's aimmed
at programming for kids, so such "low level" operations aren't going to be used
very often (at all). Still, bit of a surprise - I was assuming I should use the
shift operator for speed. Oh well.

   Now I need to figure out good ways to code all this (I've almost got the
movement and detection routines polished, and the mechanical aspects were easy
(because I'm reusing an older platform). Now I'm bumbing up against the memory &
speed limitations of the standard firmware (but it's taken me something like
four years to get there, so I'm not complaining).

--
Brian Davis



Message has 1 Reply:
  Re: Rotating through a four-bit nibble
 
(...) Maybe it is time to move on to BrickOS? int rotate_right( int value, // the value to be rotated int width, // the width of the rotated field int base, // bitnumber of rightmost bit in rotate field int amount) // the amount to rotate between (...) (19 years ago, 22-Sep-05, to lugnet.robotics)

Message is in Reply To:
  Re: Rotating through a four-bit nibble
 
(...) Since I didn't really complete the assignment I'll try again. I didn't honor the x bit request. I confirmed that even SDK v2.5 does not have shifts or rotates, and that in NQC you can only do shifts based on constant amounts. The two routines (...) (19 years ago, 21-Sep-05, to lugnet.robotics)

13 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR