Jump to content

Component: Maze Generator (HP458) (Scenarios)

From Flowcode Help
Revision as of 21:05, 16 November 2021 by Wiki bot (talk | contribs) (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Author Matrix Ltd
Version 1.0
Category Scenarios


Maze Generator component

Creates a simulation only randomised maze out of standard micromouse maze walls and pillars. Compatible with the Formula Flowcode robot.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

GenerateMaze
Clears the current maze and generates a new maze over the top. Automatically called when the size of the maze is altered. 
- VOID Return


Forward
Drives both motors of the formula flowcode forwards with the power specified. 
- BYTE Power
 
- VOID Return


ReadLineSensor
Returns the digital value from the line sensor specified. 
- BYTE Sensor
 
- BYTE Return


SpinRight
Spins the formula flowcode on the spot in a clockwise direction as seen from above. 
- BYTE Power
 
- VOID Return


CheckIR
Checks to see if a IR sensor is within the master threshold distance. 
- BYTE Sensor
 
- BYTE Return


ReadIRSensor
Reads the analogue value from the specified IR distance sensor. 
- BYTE Sensor
 
- UINT Return


SetMotors
Sets the speed and direction of the Formula Flowcode motors. 
[[File:]] - Left_Power
Valid Range = -255 to 255 
[[File:]] - Right_Power
Valid Range = -255 to 255 
- VOID Return


Reverse
Drives both motors of the formula flowcode backwards with the power specified. 
- BYTE Power
 
- VOID Return


WaitForSwitch
Waits for the specified switch to be pressed. 
- BYTE Switch
 
- VOID Return


ReadLDR
Reads the current audio signal level from the on-board light sensor. 
[[File:]] - Return


WriteLEDs
Allows control of all 8-LEDs on the front of the Formula Flowcode. 
- BYTE LED_Byte
 
- VOID Return


Initialise
Starts up the formula flowcode PWM for motor control and performs the wait for button press 
- VOID Return



Property reference

Properties
Maze Generation
Specifies how the maze is generated. Manual - All walls are shown, clicking on a wall will remove it while the switch remains active. Random - A random maze is generated 
Contained
Decides if the maze is contained or if there are openings to allow the robot to escape the maze for obstacle course type simulations. No - Creates two holes in the side walls of the maze to match the longest path possible through the maze Yes - The maze is self contained  
Width (Walls)
The number of micromouse walls wide the maze should be 
Length (Walls)
The number of micromouse walls long the maze should be 
Cell Count
The total number of individual cells the maze will have 
Connections
Simulations