Room 112: Software Development
  • Software Development Curriculum
  • CS In Entertainment
    • Fireworks
    • Historical Animation
    • Stop Motion
      • Original Stop Motion Video Instructions
    • Straight Ahead Animation
      • Comparing
      • Step 2: Adding Realism
        • Program Along With Video
    • How To Share Scratch project
    • Stick Figure Animation
      • Walking Stick Figures
      • Original Stick Figure Scene
        • How Will This be Graded?
    • Crowd Animation
      • Group Project
        • How will this be graded?
    • Fashion
      • Explainer Video / Vídeo Explicativo
        • Self Scoring Checklist
          • Complete the Student Self Grading Checklist When you are Done
      • Pattern Design
        • Notebook response
        • Program your Own Pattern
          • Pick at least TWO of these Extensions
      • Gees Bend Quilt Collage
        • Pattern Designer + Gees Bend
    • First Down Marker
      • Get Started With Code
      • Explain
    • Hispanic Heritage Activities
      • Sugar Skulls Research
      • Making Our Own program
      • Day of the Dead Mask Program
      • Coloring Pages
      • Ofrenda
        • Programming an Ofrenda
          • Ofrenda Scoring Checklist
    • Exploring Pen Tools
      • Straight Lines
      • Shapes
      • Snowflakes
    • Goal Line Technology
  • CS in Gaming
    • Make Code Arcade
    • What is a Game?
    • Flowcharting a Game
      • But What Game?
    • Try a Tutorial
    • Adding Animations
      • After You Complete the Tutorial
    • Games with a Message?
      • Before you code
    • Trivia Game: Grace Hopper
      • Keep Going
      • Keeping Score
  • Your Voice Is Power
  • HTML
    • My 1st Webpage
      • Title Tag
      • Body
      • Comments
      • What to Turn in
    • Color
      • Font Color
      • HTML Color Codes
      • Body Color
      • Headings
    • Images
      • One Line ASCII Art
      • Picture Files
    • Font Attributes
    • Links
    • Lists
    • WebPage #1: Hobby or Interest
    • WebPage #2: Vintage Computing
  • CSS
    • CSS Intro & File Set Up
    • Referencing External Style Sheet
    • CSS Declaration Examples
      • Testing Declaration Examples
      • Practice Before we Move Forward
      • CSS Image Examples
      • Formatting Hyperlinks
      • IFrame
      • Lists
    • CSS: Assignment #1
  • Text Based Programming
    • Pencil Code Intro
      • Basic Drawing
      • Pen Colors
      • Drawing with Circles
    • Dots & Fill
    • 1st Assignment: Adding Traits
    • Named Variable
    • Random & Repetition: Good Clean Fun
    • Getting Better at Repeating
    • Assignment #2: Orange Square Purple Circle
    • Symmetry
    • Fractals with Removal
      • Triangle
      • Fractal Programming
      • Assignment #3
      • Extension: More than 1 Turtle
    • Race Track
      • Custom Race Track
        • Two Turtles?
    • Hatch?
    • Pixel Challenges
  • Micro:Bit Programming
    • LED Screen
      • Light Levels
      • Animation
      • Sinking Boat
        • Boats 2- 6
        • Final Code
      • Unique Animation
        • Now Program Your Own
    • Radio
      • Micro:Bit Beacon Hunter
    • Activity and Motion
      • Network Notebook
        • Reading Code
      • Build Step Counter
    • Bag Alarm System
      • Planning:
      • Count Down Timer
      • Physical Design Scoring
      • Prototype Scoring
      • Prototype Demonstration Video
      • 2nd Block Groups
      • 3rd Block Groups
    • Fireflies Assignment
      • Native American Spirit Animal
      • Building a FireFly
        • What to turn in at this stage?
        • Review of Programming
      • UN Global Goal 15
      • Group Message & Video
      • Individual Assessment
        • How will this be graded?
      • Individual Write - Up
      • What to Turn In
    • Lighthouse Project
      • Light Sensor Lesson
      • Lighthouse Basic Signal
      • Attaching an LED
      • Designing your Lighthouse Signal
      • Attaching a Push Button Lesson
      • Attaching a Piezo Buzzer
        • I am going to regret this
      • Basic Lighthouse Design
        • Make a Plan
        • Program your Lighthouse
        • What to Turn in
    • 1st Design Project
      • Description of Problem
      • What should I do?
      • Make an Initial Physical Design
      • Write your Code
      • Client Communication
      • Build your Design
      • Install your Device
      • What to Turn In?
    • Strobe Lights
      • X & Y Coordinates increment
      • Nesting
      • Assignment & Extensions
    • Compass
      • Program a Compass
      • 8 Point Compass
      • 16 Point Compass
      • Navigation using Directions
        • Time
        • d= rt
        • What to Turn in
        • Bonus
    • Temperature Gauge
      • Temperature Alarm
      • What is a Breakboard with Headers
    • Collecting Data
      • Remote Control Data Collection
      • Try it with Gravity?
      • Population Trait Counter
        • Population Trait Counter Extensions
          • Step Counter
    • Micro:Pets
      • Happy
      • Mood Chance
      • Becoming Unhappy
      • Feeding & Playing
      • Building your Digital Pet
      • Customization and Extensions
      • What to Turn in
    • Practice Final Project
      • New Discovery
      • Thinking Like a Programmer
      • Creating the Boat "Sprite"
      • Moving the Boat Down
      • Programming a Move Procedure
      • How do we Get back up?
      • Now onto the fun part
    • Servo
      • Calibrate
      • Keep Exploring
    • Final Project
      • Make your Project
      • Project Board
  • Tech Writing
    • Rubric for Grading Tech Writing
    • Paper Craft Pumpkins
      • What to Turn in?
    • Paper Craft Flowers
      • What to Turn in?
    • Pod Production: Snowflake Paper Chains
      • Individual Snowflake Chain
      • Group Snowflake Chain
    • Smart Traffic Lights
    • Croc-Spotting Drones
    • Fujitsu Gymnastics
      • Written Responses
    • Program and Write
  • Computer Exploration
    • Basic Computer Skills
    • Excel Pixel Art
    • Tesselations
    • Super Heros
      • Hour of Code Activities
      • What to turn in??
      • Extensions
    • Nasa Moon 2 Mars
    • Emojis
    • Doodle for Google
    • Valentines E Card
    • PSWD: Solve by Acting Out
    • Wolf Sheep Predation
    • E-Pass
      • The Actual PASS
      • Design a Home Screen & Screen Navigation
      • Who Said Anything About a Video
        • DHS Logo Files
    • Truchet Tiles
      • Can you make them move on their own?
      • Can we make more interesting shapes?
  • ProblemSolving
    • Problem 1
    • Problem 2
    • Problem 3
    • Problem 4
    • Problem 5
    • Problem 6
    • Problem 7
    • Problem 8
    • Problem 9
    • Problem 10
    • Problem 11
    • Problem 12
      • Problem 12A
Powered by GitBook
On this page
  • Basic Functionality: If it is dark outside the signal should stay on for 3 seconds and off for 1 seconds. If it is daylight outside, the signal should remain off.
  • Our code doesn't turn the light back on? So does the light only flash one time per night? Is there an error in our algorithm?
  1. Micro:Bit Programming
  2. Lighthouse Project

Lighthouse Basic Signal

PreviousLight Sensor LessonNextAttaching an LED

Last updated 5 years ago

Basic Functionality: If it is dark outside the signal should stay on for 3 seconds and off for 1 seconds. If it is daylight outside, the signal should remain off.

To develop the algorithm: use the LED Grid to send your signal. However in the next steps you will add an extended LED bulb

Repeat Forever
    if  light level is low
        turn on light signal
    else
        turn off light signal      
    

TIP: Signal will all the LED on full bright for ease - since we are going to change your signal from the LED Grid to an attached LED Bulb, there is no need to develop a complicated signal here.

Now that you are sending a signal based the "time" of day, it is time to modify the signal to flash during the night for incoming ships to see.

“If you close your eyes, no lighthouse can help you!” ― Mehmet Murat ildan

We want the signal to stay on for 3 seconds and turn off for 1 second, so you need to modify the code when the light level is low.

if light level is low
    turn on light signal
    pause 3 seconds
    turn off light signal
    pause 1 second

TIP: the microbit doesn't measure time in seconds, it measures time in milliseconds

Our code doesn't turn the light back on? So does the light only flash one time per night? Is there an error in our algorithm?

Your lighthouse should have its own unique signal, this helps navigating ships identify the lighthouse in the distance. Take a minute and design your own simple, yet unique flashing signal.

This algorithim and portions of this assignment taken directly from

https://sites.google.com/view/microbitofthings/2-simple-control-systems/6-lighthouse?authuser=0