Robojoy challenge class

4-4-1 Find the minimum and maximum

  • Page:
  • 1
  • 2
  • 3
  • 4

"Algorithm" is written in English "Algorithm" a word that represents the "idea" in the program. In this series I want to show you how to take advantage of the algorithm in the programming of the robot. (Takuya Matsubara)


Seeking maximum

At first you need to prepare the light sensor and the NXT intelligent block.
This time, I would like to check the "maximum value" "minimum value" by measuring the light sensor.
It should be noted that the largest value is that the "maximum", and the smallest value is the "minimum".

So I tried to make a program here. By measuring the light sensor 100 times, display the maximum value on the screen.
I have created using the NXT software 2.0.
[Download] Program to find the maximum (Created in NXT 2.0 software)

I tried to expand the portion of the loop. Set to "count" rather than "permanent" on the loop block, it is set to repeat "100" times.
I'm asking the maximum value in this loop.

  • Page:
  • 1
  • 2
  • 3
  • 4