Skip to content

Commit

Permalink
Initial commit of Mind Control
Browse files Browse the repository at this point in the history
  • Loading branch information
mesheets committed Mar 19, 2020
1 parent 452f851 commit e8ec603
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# MindControl
A Visual Basic program for controlling a Lego MindStorms RCX or Cybermaster unit
# Mind Control
A Visual Basic program for controlling a Lego MindStorms RCX or Cybermaster unit

[Archive of Original Website](http://web.archive.org/web/20020803004941/http://homepages.svc.fcj.hvu.nl/brok/legomind/robo/)

The archived website is frame-based, so to access the MindControl part of the website,
1. Click the "MindStorms" link along the left side
2. Click the "Mind Control" link in the next-to-last bullet point on the MindStorms page

## About Mind Control
At one time, the source code was available; however, it no longer appears to be accessible.
A binary release of v1.0.2 is available and includes a few demo programs.
55 changes: 55 additions & 0 deletions demo/3MotorsRandom.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
'Random drift of three motors
.DeleteAllTasks
.BeginOfTask 1 'controls motor A
.SetVar 1, Number, 1 'variable 1 gets value 1
.Loop Number, 0 'eternal loop
.SetVar 2, RANDOM, 1
.If VARIABLE, 2, GREATER_THAN, Number, 0
.SetFwd motor_a
.Else
.SetRwd motor_a
.EndIf
.SetPower motor_a, RANDOM, 2
.On motor_a
.Wait Number, 100
.Off motor_a
.EndLoop
.EndOfTask
PauseDownload 1
.BeginOfTask 2 'controls motor B
.SetVar 3, Number, 1 'variable 1 gets value 1
.Loop Number, 0 'eternal loop
.SetVar 4, RANDOM, 1
.If VARIABLE, 4, GREATER_THAN, Number, 0
.SetFwd motor_b
.Else
.SetRwd motor_b
.EndIf
.SetPower motor_b, RANDOM, 2
.On motor_b
.Wait Number, 100
.Off motor_b
.EndLoop
.EndOfTask
PauseDownload 1
.BeginOfTask 3 'controls motor C
.SetVar 5, Number, 1 'variable 1 gets value 1
.Loop Number, 0 'eternal loop
.SetVar 6, RANDOM, 1
.If VARIABLE, 6, GREATER_THAN, Number, 0
.SetFwd motor_c
.Else
.SetRwd motor_c
.EndIf
.SetPower motor_c, RANDOM, 2
.On motor_c
.Wait RANDOM, 100
.Off motor_c
.EndLoop
.EndOfTask
PauseDownload 1
.BeginOfTask 0
.StartTask 1
.StartTask 2
.StartTask 3
.EndOfTask
6 changes: 6 additions & 0 deletions demo/DownloadSounds.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'This is not a program but will be executed during download!
PlaySystemSound(3)
PlayTone(400,100)
PlaySystemSound(5)
PlayTone 200,300
PlayTone 400 500
22 changes: 22 additions & 0 deletions demo/RandomTones.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'random tones
DeleteAllTasks
BeginOfTask 0
SetVar 1, Number, 1 'variable 1 gets value 1
Loop Number, 0 'eternal loop
SetVar 2, RANDOM, 3 'random integers van 0 tot n
If VARIABLE, 2, EQUAL_TO, Number, 0
PlayTone 400, 1
EndIf
If VARIABLE, 2, EQUAL_TO, Number, 1
PlayTone 800, 1
EndIf
If VARIABLE, 2, EQUAL_TO, Number, 2
PlayTone 1600, 1
EndIf
If VARIABLE, 2, EQUAL_TO, Number, 3
PlayTone 3200, 1
EndIf
Wait RANDOM, 100
EndLoop
EndOfTask

29 changes: 29 additions & 0 deletions demo/Sensor-MotorControl.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'This is an example of Spirit code
'Two touch sensors control two motors
DeleteAllTasks
BeginOfTask 1
SetVar 1, Number, 1 'variable 1 gets value 1
Loop Number, 0 'eternal loop
If SENSOR, 0, EQUAL_TO, Number, 0
On (motor_a)
Else
Off (motor_a)
EndIf
EndLoop
EndOfTask
pausedownload
BeginOfTask 2
SetVar 1, Number, 1 'variable 1 gets value 1
Loop Number, 0 'eternal loop
If SENSOR, 2, EQUAL_TO, Number, 0
On (motor_c)
Else
Off (motor_c)
EndIf
EndLoop
EndOfTask
pausedownload
BeginOfTask 0
StartTask 1
StartTask 2
EndOfTask
Binary file added settings
Binary file not shown.

0 comments on commit e8ec603

Please sign in to comment.