> ## Documentation Index
> Fetch the complete documentation index at: https://docs.samstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# SAM Space: Visual Flow-Based Coding for Early Learners

> SAM Space is SAM Studio's visual, icon-driven environment for K-5. Connect blocks on a canvas to build programs — no reading required.

SAM Space is the friendliest way to start coding with SAM Labs hardware. Instead of typing or reading text, you drag colourful icon blocks onto a canvas and draw lines to connect them — forming a visual flow that tells your hardware what to do. Because every block uses pictures rather than words, SAM Space is perfect for K–5 classrooms where reading ability varies.

## What You Can Build in SAM Space

SAM Space projects let you bring real-world electronics to life without writing a single line of code. Here are some things you and your students can create:

| Project idea                                    | Hardware blocks involved      |
| ----------------------------------------------- | ----------------------------- |
| Light up an LED when a button is pressed        | Button · LED                  |
| Spin a motor faster as a slider moves           | Slider · DC Motor             |
| Sound a buzzer when it gets dark                | Light Sensor · Buzzer         |
| Make an RGB LED change colour on a timer        | Timer · RGB LED               |
| Stop a fan when temperature rises above a limit | Temperature Sensor · DC Motor |
| Create a traffic-light sequence                 | Timer · RGB LED (×3)          |

## Getting Started

<Steps>
  <Step title="Open SAM Studio">
    Launch SAM Studio in your browser or desktop app and sign in to your account.
  </Step>

  <Step title="Create a new project">
    Click **New Project** on your dashboard. Give your project a name so you can find it later.
  </Step>

  <Step title="Choose SAM Space">
    When prompted to select an environment, click **SAM Space**. The icon-block canvas opens automatically.
  </Step>

  <Step title="Drag blocks onto the canvas">
    Browse the block panel on the left. Drag the blocks you need — such as a **Button** input and an **LED** output — onto the canvas.
  </Step>

  <Step title="Connect the blocks">
    Click the output dot on one block and drag a line to the input dot on the next. The connection turns solid when it snaps into place.
  </Step>

  <Step title="Pair hardware or use virtual blocks">
    Turn on your SAM Labs hardware and click **Connect** to pair it over Bluetooth. If you don't have physical hardware nearby, click the **Virtual** toggle on any block to simulate it on screen.
  </Step>

  <Step title="Run your program">
    Click the **Play** button. Your connected (or virtual) hardware responds to the flow you built. Press **Stop** when you're done.
  </Step>
</Steps>

## Key Features

<CardGroup cols={2}>
  <Card title="No reading required" icon="image">
    Every block is represented by a clear icon. Young learners can build and modify programs entirely through pictures and colours.
  </Card>

  <Card title="Virtual hardware" icon="display">
    Can't get the physical blocks out today? Use virtual versions of every sensor and output directly on screen — no Bluetooth needed.
  </Card>

  <Card title="Visual flow logic" icon="arrow-right-arrow-left">
    Draw lines between blocks to show cause and effect. Students can literally see how data travels from a sensor to an output.
  </Card>

  <Card title="Cloud auto-save" icon="cloud">
    Your project is stored in the cloud and saved automatically while you work, so nothing is lost if the browser closes unexpectedly.
  </Card>
</CardGroup>

<Note>
  SAM Space saves your project automatically every 30 seconds. You'll see a brief **Saved** confirmation in the top bar each time it syncs. No manual saving is needed.
</Note>

## Tips for the Classroom

<Tip>
  Start with a single connection — one input block wired to one output block — before adding more. This helps students understand cause and effect before they tackle more complex flows.
</Tip>

<Info>
  SAM Space projects can be shared with your teacher or classmates using the **Share** button in the top-right corner of the canvas. Anyone with the link can view (but not edit) your project.
</Info>

When your students are ready to add text-based logic like loops and conditions, they can move on to [SAM Blockly](/environments/sam-blockly), which builds on the same hardware but introduces programming vocabulary through labelled code blocks.
