• Home
  • Getting Started
  • Beginning Lessons
    • Lesson B1 Moving Robot
    • Lesson B2 Turning
    • Lesson B3 Make a Shape
    • Lesson B4 Draw Shapes
  • Output Lessons
  • Sensor Lessons
  • Advanced Lessons
  • Facilitator lesson plans
    • Registration
  • Resources
  • EPIQ2025
QuorumRobotFinch
  1. You are here:  
  2. Home
  3. Advanced Lessons
  4. Lessons Plans & Code
  5. Advanced Lessons

Finch Song T

Copy and paste.  not complete but can be run on the finch and make sounds.

use Libraries.Robots.BirdBrain.Finch
// This code is not complete. It will run on the Finch and do a rought version of the song.
// There are some problems with the code or the documentation. I will do the need data collection.
Finch finch
number d=0.35
number speed=3
number h = d*2
number w=d*4
number q = d
number e=d/2
number s =d/4
//START Motors
// A
repeat 2 times
finch:PlayNote(55, e)
finch:Pause(0.10)

finch:PlayNote(60, q)
finch:Pause(d/2)
finch:PlayNote(60, e)
//finch:Pause(d*4)

finch:PlayNote(58, d)
finch:Pause(d)
finch:PlayNote(62, d)
finch:Pause(d)
finch:PlayNote(58, d)
finch:Pause(d)
finch:PlayNote(60, d)
finch:Pause(d)
finch:PlayNote(55, d)
finch:Pause(d*3)
end
finch:Pause(d*3)
// B
finch:PlayNote(69,8)
finch:Pause(d)
finch:PlayNote(71,8)
finch:Pause(d)
finch:PlayNote(72,8)
finch:Pause(d)
finch:PlayNote(75,15)
finch:Pause(d)
finch:PlayNote(60,8)
finch:Pause(d)
finch:Disconnect()

Advanced Lesson 1

Advanced Lesson 1 edit for line numbers

Compass Sensory, Motors, Class & Main, Speech, Sounds, Finch buttons, Microbit display. 

The program will set up the compass sensor with a fast spin, then display and speak and the compass points, It will pause if it senses true north and then resume. You end this program by pressing the A button on the Micro-bit. 
This lesson can include information about earth’s magnet field and how birds and animals make use of the magnet field to navigate. Advanced Lesson do not include the picture of the Block Code. You can copy and paste this code into Quorum Studio to see it as a Block Code.

 

don't copy Advance Lesson 1 Copy and Past  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

 

use Libraries.Robots.BirdBrain.Finch
class Main
 action Main
Finch finch
finch:Pause(2)
say "Warning, stay clear, Finch is Evaluating the magnetic field"
finch:SetTail("All",100,0,100)
finch:SetBeak(100,0,100)
finch:SetMotors(100,-100)
finch:Pause(2)
finch:SetMotors(100,-100)
finch:Pause(2)
finch:StopAll()
say" Attention, Attention. Magnetic North Found, Compass is ready."
finch:Pause(2)
finch:SetMotors(2,-2)
repeat until finch:GetButton("A")
if finch:GetCompass() >=340
finch:Output("N")
finch:SetTail("All",0,0,100)
finch:SetBeak(0,0,100)
say "True North"
finch:Stop()
finch:Output("N")
finch:Output("N")
repeat 5 times
finch:PlayNote(72,0.3)
finch:PlayNote(100,0.3)
finch:Pause(0.2)
end
finch:Output("N")
finch:SetMotors(2,-2)
elseif finch:GetCompass() >=300 or finch:GetCompass() <=45
finch:Output("N")
finch:SetTail("All",0,0,100)
finch:SetBeak(0,0,100)
say "North"
elseif finch:GetCompass() >=46 and  finch:GetCompass() <=135
finch:Output("E")
finch:SetTail("All",50,100,0)
finch:SetBeak(50,100,0)
say "East"
elseif finch:GetCompass() >=136 and  finch:GetCompass() <=225
finch:Output("S")
finch:SetTail("All",100,0,0)
finch:SetBeak(100,0,0)
say "south"
elseif finch:GetCompass() >=226 and  finch:GetCompass() <=299
finch:Output("W")
finch:SetTail("All",0,100,25)
finch:SetBeak(0,100,25)
say "west"
end
output finch:GetCompass()
finch:Pause(0.2)
finch:SetMotors(2,-2)
 finch:Pause(0.2)
end
finch:Stop()
finch:StopAll()
finch:SetTail("All",100,0,0)
finch:SetBeak(100,0,0)
finch:Pause(2)
finch:SetMotors(100,-100)
finch:Pause(3)
finch:SetMotors(-100,-5)
finch:Pause(3)
finch:StopAll()
finch:Disconnect()
end
end

 

 

Advanced Lessons

These lessons combine the Output and the Sensors. They longer and more complete and add additional Computer Science Concepts.  One code per lesson is provided but other other code can preform these tasks and are valid. 

  • Advanced Lesson 1
  • Advanced Lessons
  • Finch Song T

Advanced Lesson List

  • Advanced Lesson 1
  • Advanced Lessons
  • Finch Song T

Main Menu

  • Home
  • Getting Started
  • Beginning Lessons
    • Lesson B1 Moving Robot
    • Lesson B2 Turning
    • Lesson B3 Make a Shape
    • Lesson B4 Draw Shapes
  • Output Lessons
  • Sensor Lessons
  • Advanced Lessons
  • Facilitator lesson plans
    • Registration
  • Resources
  • EPIQ2025

Login Form

  • Forgot your password?
  • Forgot your username?
  • Create an account

Everything on this web site is available at no cost and without registration.
Self Learner, Facilitators and Teachers may register to receive quarterly updates (no more than 4 times a year) and the ability to upload your code and questions. 

Copyright © 2025 QuorumRobotFinch. All Rights Reserved.
Joomla! is Free Software released under the GNU General Public License.


This site is not apart of the Quorum Language group or BirdBrains Inc.
Tim is thankful for those groups efforts to advance education.