How SAM Blockly Differs from SAM Space
If you’re deciding between environments, use this comparison to choose the right fit for your students:| Feature | SAM Space | SAM Blockly |
|---|---|---|
| Audience | K–5 | Grades 4–8 |
| Block style | Icon-only, flow-based | Text-labelled, snap-together |
| Programming concepts | Visual cause-and-effect | Loops, conditions, variables, events |
| Text required | No | Yes (labels on blocks) |
| Virtual hardware | ✓ | ✓ |
| Cloud auto-save | ✓ | ✓ |
Creating a SAM Blockly Project
Select SAM Blockly
Choose SAM Blockly from the environment picker. The block workspace loads with a palette of categorised blocks on the left.
Explore the block categories
Blocks are grouped by type — Inputs, Outputs, Logic, Loops, Math, and Variables. Click a category to expand it and see what’s available.
Build your program
Drag blocks from the palette into the workspace and snap them together. Blocks only connect where they make logical sense, so mismatched types won’t attach.
Connect hardware or go virtual
Pair your SAM Labs hardware over Bluetooth using the Connect button, or enable Virtual mode on any block to simulate it without physical devices.
What a Blockly Program Looks Like
Because SAM Blockly is visual, here’s a written description of a simple example — a light-sensing lamp:When the program starts, set a variable calledIn the Blockly workspace this looks like a stack of colour-coded puzzle pieces:brightnessto the value read from the Light Sensor block. Inside a repeat forever loop, check: ifbrightnessis less than 50, then turn on the LED (set colour to white). Else, turn off the LED (set colour to black). At the end of the loop, wait 500 milliseconds before reading the sensor again.
- A yellow repeat forever block wraps everything.
- Inside it, a green if / else block contains the condition.
- A blue LED set colour block sits inside each branch.
- An orange wait block closes the loop.
Key Concepts SAM Blockly Introduces
Loops
Repeat a sequence of actions — forever, a set number of times, or while a condition is true.
Conditions
Make decisions with if, if/else, and if/else if blocks that respond to sensor values or variable states.
Variables
Store and update values — like a sensor reading or a counter — and use them anywhere in your program.
Events
Trigger code when something happens, such as a button press or a threshold being crossed.
Virtual Hardware Support
You can run a complete SAM Blockly project without any physical hardware. Toggle the Virtual switch on each block in the hardware panel to simulate inputs (move a slider with your mouse) and watch virtual outputs respond in real time. This is ideal for homework assignments or days when the hardware kit isn’t available.SAM Blockly saves your project to the cloud automatically every 30 seconds. Look for the Saved indicator in the top bar — you never need to press a save button manually.