Roboki - Session 1

From Yudurobotics
Revision as of 10:47, 30 September 2024 by Evobi admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Dive into Basics: Roboki Basics - Step-by-Step

Roboki microcontroller, ideal for various robotics and electronics projects standing against a white background.
Description :

Welcome to the world of Roboki, a versatile microcontroller designed to help you explore a wide range of robotic projects. This is Session 1 of your journey with the Roboki Kit, where you'll begin to understand the essential components and start writing code for your first projects. The Roboki Kit comes equipped with various input/output modules, motors, and LEDs, making it an ideal platform for learning the basics of robotics and electronics.This session lays the foundation for future projects, introducing you to how Roboki operates and how to program it using the PLODE app. By the end of this session, you’ll have hands-on experience with connecting components and writing code, a crucial first step toward mastering more complex projects with Roboki.

Objective of the Activity:

This lesson introduces you to the fundamental components of the Roboki Kit and how to start coding with the PLODE app. Understanding these basics sets the stage for more advanced robotics projects where you can incorporate motors, sensors, and other external modules. With Roboki, the possibilities are endless, and this is just the beginning of your journey into robotics. Stay tuned for more exciting projects in the upcoming sessions!

1.HARDWARE

1. Introduction to Roboki:

The Roboki Kit is designed with a range of versatile components, making it ideal for various robotics and electronics projects. As you explore Roboki, you’ll find that each part has a specific purpose, from providing input signals to generating output actions. Understanding how these components work together is essential for creating functional and exciting robotic projects.

  • C Port for Power: Roboki is powered via the C Port, allowing you to connect it to a power source such as a computer or external battery. This ensures Roboki has the energy needed to operate its components and run your code.
  • A and B IO Ports: These two IO ports serve as the connection points for external input or output modules, such as sensors or additional LEDs. By connecting devices to these ports, you expand Roboki’s functionality and control more complex systems.
  • Built-in Switches (SW1 and SW2): Roboki features two built-in switches that act as input devices. These switches allow you to trigger actions in your projects, such as turning on an LED or controlling motors. Learning how to program these switches is a key part of mastering input-output interactions with Roboki.
  • Motor and Servo Pins: Roboki comes equipped with M1 and M2 motor pins for motor connections, as well as S1 and S2 servo pins for more precise servo motor control. These pins enable you to bring movement to your robotic creations, whether it's for wheels, arms, or other moving parts in your project.
  • Power and Reset Buttons: The power button allows you to turn Roboki on and off easily. Additionally, the reset button can restart Roboki and put it into sleep mode, conserving power when not in use. These buttons ensure you can manage Roboki’s operations efficiently.
  • Built-in RGB LEDs: Roboki has two RGB LEDs built into the board. These LEDs can display a range of colors and are a valuable visual output tool for many projects. You’ll use these LEDs frequently in coding lessons to represent actions or signals, and you can control their colour intensity to create visual effects.


To know more about the Roboki, visit Roboki.

2.SOFTWARE

2. Introduction to PLODE app:

The PLODE app is your interface for writing and uploading code to Roboki. It’s a user-friendly platform that allows you to control Roboki’s internal and external components. Here’s how to get started with PLODE:

  • Step 1: Open the PLODE app and connect it to your Roboki.
  • Step 2: You’ll see several options on the home screen, including Play, Learn, Code, and App Mode. For this session, we will select the Code option to begin programming.
  • Step 3: Choose the Project-based option, then select New Project to start a new coding session.

Once a new project is set up, the next step is selecting the appropriate modules for our code:

Internal Modules: For internal components like the switches and LEDs, navigate to the Input section to select the built-in switches (SW1, SW2), and the Output section to select the internal RGB LEDs.

External Components: If your project involves external components (such as motors or sensors), you can select them from the external components section based on your project’s needs.

In the PLODE app, code is written using blocks. Here’s a breakdown of the most common blocks used in Roboki projects:

  • Start Block: Marks the beginning of your code.
  • Action Block: Executes specific actions such as turning LEDs on/off or moving motors.
  • Decision Block: Allows for conditional statements, where certain actions are performed based on input or sensor data.
  • Wait Block: Adds a time delay to an action, which is useful for creating sequences.
  • Stop Block: Ends the code execution.
  • Loop Block: Repeats a sequence of actions indefinitely.
  • Repeat Block: Repeats a set of actions a specified number of times.


To know more about the app, visit PLODE.

Let's Learn


Turning On the Left LED

Let’s write our first code to turn on the left LED of Roboki:

  • Select the Left LED from the output section.
  • Go to the code section, and select the Action Block. In the action block, select Roboki Left Eye 1 and set the intensity of the red, green, and blue colors to 100.
  • Add a Wait Block with a 1-second delay to keep the LED on for a short period.
  • Finish the code by adding a Stop Block.

Now, upload the code, and observe the left LED turning on for one second and then turning off. If you want the LED to stay on, replace the stop block with a loop block to repeat the action indefinitely.

Turning On Both LEDs

Now, let’s turn on both LEDs:

  • Select both the Left and Right LEDs in the output section.
  • In the code section, add an action block for each LED. Set the intensity of red, green, and blue to 100 for both LEDs.
  • Upload the code, and both LEDs will turn on simultaneously.

Color Mixing with LEDs

To experiment with color mixing, let’s create a sequence where the two LEDs display different colors:

  • Add action blocks to set the first LED to red (100 intensity) and the second LED to blue (100 intensity).
  • Add a wait block with a 1-second delay.
  • Add a second action block to set the first LED to green and the second LED to red.
  • Add another wait block with a 1-second delay.
  • Add a third action block to set the first LED to blue and the second LED to green.
  • Add another wait block, then finish with a Loop Block to repeat the color mixing continuously.

Upload the code, and you’ll see both LEDs alternating colors, creating a dynamic color-mixing effect.

What Next?

Challenge!

Create captivating LED patterns using colours like yellow, orange, and pink, expanding beyond the typical red, green, and blue.


For more Roboki sessions, visit Roboki sessions[1]