PICO PicoCricket Скачать руководство пользователя страница 1

PicoCricket

Reference Guide

 

 

 

 

    

                                  The 

P

layful 

I

nvention 

Co

mpany

PicoCricket

Reference Guide

Version 1.0

Содержание PicoCricket

Страница 1: ...PicoCricket Reference Guide The Playful Invention Company PicoCricket Reference Guide Version 1 0...

Страница 2: ...ew Cricket activities particularly Keith Braafladt Stephanie Hunt Chip Lindsey Hideki Mori Kristen Murray Mike Petrich Margaret Pezalla Granlund Natalie Rusk Michael Smith Welch Karen Wilkinson and Di...

Страница 3: ...Contents Credits 2 lntroduction 4 PicoBlocks 8 Blocks Summary 12 Blocks Detailed by Category 14 Melody and Rhythm Editors 30 The PicoBlocks Text Language 35 Error Messages 48...

Страница 4: ...rall introduction If you want more detailed information then come back to this Reference Guide We are continually updating the Reference Guide You can download the latest version from www picocricket...

Страница 5: ...t is communicating through its infrared transmitter If you push the Cricket button while the Cricket is running a program the program will stop If you push the button when no program is running the Cr...

Страница 6: ...tors Actuators are devices that make things happen in the world The PicoCricket Kit includes four types of actuators colored lights sound box motor with motor board and numeric display Name Descriptio...

Страница 7: ...you put different materials for example play dough or a banana between the alligator clips the resistance will change You can also use the resistance sensor to detect when the alligator clips are touc...

Страница 8: ...l the cursor turns into that tool Arrow Use the Arrow to drag blocks from the Blocks Palette to the Workspace or within the Workspace To move an entire stack drag from the top block Dragging a block f...

Страница 9: ...clicking with the Magic Wand Scissors Use the Scissors to get rid of blocks Clicking on a block in a stack will also cut all blocks attached below it If you delete blocks by mistake click Undo You can...

Страница 10: ...he Second Wand For example you can use the Second Wand to start background music or display sensor values while another program is running melody1 2 display forever brightness 2 Tags Use the Tags tool...

Страница 11: ...on the appropriate dot in the Tags tool then click on the block that you want to tag setlight color To remove a tag from a block click in the center of the Tags tool and then click on the block setli...

Страница 12: ...essed brightness reports a value from the light sensor loud reports true if the sound sensor detects a loud sound loudness reports a value from the sound sensor connected reports true if the resistanc...

Страница 13: ...tic operations r a n d o m picks a random value between the two numbers makes a comparison between two numbers and reports true or false and reports true if both conditions are true or reports true if...

Страница 14: ...etlightcolor 0 setlight power how bright setlight power wait 40 setlight power 100 sets light to half power and turns it on waits for 40 ticks sets light back to full power setlightpower can take numb...

Страница 15: ...r is communicating properly with the Cricket note how high a note note 5 50 plays the note 50 for 5 ticks half a second how long note can play notes between 0 lowest and 100 highest You can play notes...

Страница 16: ...ne sets instrument to trombone plays note 16 on the trombone for 5 ticks half a second Sets the instrument to be used for subsequent notes or melodies You can select the instrument with the slider or...

Страница 17: ...to stop more abruptly or more gently try using the brake and coast commands in the PicoBlocks Text Language motor onfor how long motor onfor 20 turns on motor for 20 ticks 2 seconds 10 ticks 1 second...

Страница 18: ...wer set power 10 motor on sets motor power to 10 turns the motor on setpower takes values between 0 no power and 100 strongest power setpower does not turn on the motor it only sets the power Default...

Страница 19: ...ensor detects a sound turns the light pink loud reports true if the sound sensor detects a sound with loudness greater than 15 loudness waituntil loudness 30 setlight color waits until the sound senso...

Страница 20: ...R beamIR forever wait 10 r a n d o m 0 100 beams a number between 0 and 100 beamIR beams a number to another Cricket via infrared IR To use this command you need two Crickets one beaming the IR signal...

Страница 21: ...timer equals 1 second Flow Blocks wait wait 20 light off setlight color turns the light pink waits for 20 ticks 2 seconds turns the light off 10 ticks equals 1 second Default value wait 10 waituntil...

Страница 22: ...epeat how many times 10 motor onfor repeat 4 reverse repeat this 10 times if then if this is true if then forever chirp connected this will happen place here whatever you want to do after the if finis...

Страница 23: ...under else stopall if then forever chirp touch motor on stopall if this is true everything stops including the motor Stops all programs and motors but leaves lights on stopall is equivalent to pressin...

Страница 24: ...Spacer Without Spacers With Spacers 10 motor onfor repeat 4 reverse motor onfor 4 10 motor onfor repeat 4 reverse motor onfor 4 Use spacers to keep the blocks from overlapping Adding spacers does not...

Страница 25: ...on for 40 ticks subtracts two values this minus that setlight power brightness 100 turns on light with a power of 100 minus the value of the brightness sensor for example if the brightness sensor is 6...

Страница 26: ...dom 0 100 if this is greater than that brightness 50 if then chirp forever this will happen number1 number2 reports true if number1 is greater than number2 if this is less than that brightness 60 if t...

Страница 27: ...condition loud are both true or if this or that is true or if then chirp forever loud touch this will happen or reports true if the result of the first condition touch or the second condition loud is...

Страница 28: ...name 3 a new block with that name appears in 4 Use it in other stacks 2chirps 4 repeat chirps 8 times store in box1 box1 store in box2 box2 Use these blocks for setting and retrieving the values of va...

Страница 29: ...e drag it into the workspace click on it and type in the new name store in box1 box1 setlight color 10 store in my color my color setlight color 10 When box1 is renamed in the workspace the blocks in...

Страница 30: ...und palette are two buttons one for opening the Melody Editor the other for opening the Rhythm Editor After you create a new melody or rhythm it will appear as a new block in the Sound palette You can...

Страница 31: ...ither click on the keyboard or click directly in the Melody Workspace When you are finished creating your melody click OK to turn your melody into a block and exit the Melody Editor Play or stop Inser...

Страница 32: ...o copy cut and play the selection You can also play the selection by double clicking on it All of your melodies appear at the left of the Melody Editor Click on the melody that you want to edit To cha...

Страница 33: ...edit by clicking on a block in the palette on the left side or create a new rhythm by clicking on the New Rhythm button at the top left When you are finished creating your rhythm click OK to turn you...

Страница 34: ...All of your rhythms appear at the left of the Rhythm Editor Click on the rhythm that you want to edit To change the name of a rhythm click on the block and type a new name Use to make a copy of a rhyt...

Страница 35: ...he same time Also there are some advanced programming features that are not available using the blocks As your programs become longer and more complex you may want to consider using the Text Language...

Страница 36: ...lose the list of words that are to be repeated You can get guidance about how the text word corresponding to a particular block is meant to be used by clicking on that block which you can find on the...

Страница 37: ...Cricket will chirp twice Procedures with Inputs and Outputs You can create procedures that take inputs or produce an output For example you can create a procedure named chirps that takes an input tha...

Страница 38: ...ined by typing in the Procedures Area The block definitions begin with the keyword block For example block chirp1 chirp wait 3 chirp end chirp1 Makes a block that chirps twice Blocks that you have def...

Страница 39: ...fer only to the light plugged into the port add two periods to the end of the word without spaces setlightcolor 90 To refer only to the light plugged into the port add a period and a colon to the end...

Страница 40: ...er will cause colors 20 through 49 to flash Variables of this kind are called local variables because they are only available for use by the procedure in which they are defined Because PicoBlocks has...

Страница 41: ...sounds Playsound repeats the list in sequence for numbers greater than 24 playsound 24 The sound box meows set inst setinstrument number Sets the instrument for the next note or melody to be played o...

Страница 42: ...er 100 motoronfor 10 The motor spins quickly setpower 30 motoronfor 10 The motor spins slowly text only brake Causes the motor to stop immediately This is slightly different from motoroff which does a...

Страница 43: ...awresistance Reports the value measure by the resistance sensor as a number between 0 and 1023 rawresistance provides finer resolution than resistance forever display rawresistance wait 1 The display...

Страница 44: ...n the Cricket chirps and when the touch sensor is pressed Flow Block Word Example Usage wait wait number Waits a certain amount of time in tenths of a second chirp wait 10 chirp The Cricket pauses for...

Страница 45: ...e second list if it is not to test forever ifelse touch setlightcolor random 0 99 lightoff end The light flashes random colors if you press the touch sensor and turns off if it you do not press it sto...

Страница 46: ...display shows the number 3 r a n d o m random number number Report a random number the two inputs determining the lower and upper limits display random 0 10 The display shows a random number from 0 t...

Страница 47: ...on Reports true the number 1 if the result of the condition is false number 0 to test forever if not touch chirp end The Cricket chirps if the touch sensor is not pressed My Blocks Block Word Example...

Страница 48: ...and existing words are considered invalid Solution Type another name Communication problem There was a communication problem while PicoBlocks was downloading data to your Cricket Solution Make sure th...

Страница 49: ...uch memory Solution Use a repeat to do more with fewer blocks Or place a on the top of the stack and click on it to type in a name Too many music blocks Limit of 24 You have made more than the maximum...

Страница 50: ...can t have more than 3 inputs You can t make a block with more than 3 inputs Solution Store the other values as global variables and use the names of these variables in your program For more informati...

Страница 51: ...ion Make sure there are an equal number of open and closed brackets Missing name after to Missing name after block Missing name after bblock Solution The words to block and bblock need to be followed...

Страница 52: ...needs a local variable Make needs to be followed by the name for a local variable Solution Check that the word after make has a quotation mark before it and is a local variable For example block fastl...

Отзывы: