Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

ADDI AI Coding


Block coding application utilizing ADDI blocks

📱 Project Introduction


Connect Addi blocks via Bluetooth.
Then, perform block coding and execute it to see the ADDI blocks operate in real-time.

📆 When?


240201~ , KIST_Creamo

🙂 Members


Members
Seungyeon JI
Heeyun HEO
Jiwoo BYUN

⚙️ Environment Setting


예제

  • IDE: Android Studio 2022.3.1.21
  • Flutter SDK: 3.16.8


▶ How to RUN?


flutter run lib/main.dart

🏆 Results


MAIN PAGE

1

START PAGE

2

CONTENT PAGE

image


HINT PAGE

3


PUZZLE PAGE

3


** Connection Block**
When the user drags and drops Connection Block 1, Connection Block 2 is automatically created below it. Even if these two blocks appear separate on the screen, the server recognizes them as connected.

** Repeat Block**
The blocks following the Repeat Block are repeated on the server according to the number specified in the Repeat Count Block located at the end of the loop.

** Speaker Block**
When the user executes the Speaker Block and the Speaker On Block, sound is produced from the actual block.

** Motor Block**
When the user executes the Motor Block and the Direction Block, the actual block moves.

** LED Block**
When the user executes the LED Block and the Color Block, the actual block lights up.

** Image Block**
When the user executes the Image Block, a specific shape appears on the actual block.

📑Flow Chart


002



➕ Details


main.dart

  • The file that runs the application.

splash_page.dart

  • This is the initial screen where Addi AI coding is executed.

start_page.dart

  • The page is for choosing between "Getting Started" and "How to Use."

content_page.dart

  • You can check the quiz table of contents and select a quiz from here.

puzzle_page.dart

  1. Initialization
  • The widget initializes with a given image path for the puzzle.
  1. Scrolling Interface
  • It provides a horizontally scrollable interface divided into sections. The user can scroll through different sections using buttons.
  1. Image Drag and Drop
  • Users can drag and drop images onto a target area. The dropped images can snap to specific positions based on predefined snap points.
  1. Reset Functionality
  • There's a reset button to clear all dropped images and reset the puzzle.
  1. Bluetooth Integration
  • It includes a button to trigger a Bluetooth scan, and another button to initiate a puzzle-solving process which involves generating a sequence of connected block numbers.
  1. Trash Can Feature
  • Users can drag images to a trash can area to delete them from the puzzle.
  1. Image Snap and Connect
  • Images can snap to each other when placed close enough, forming connections. This functionality is crucial for solving the puzzle.
  1. Bluetooth Data Transmission
  • Upon solving the puzzle, the connected block numbers are formatted and sent via Bluetooth.

bluetooth_helper.dart

  1. Bluetooth Device Management
  • connectedDevice: Represents the currently connected Bluetooth device.
  • devices: A list to store available Bluetooth devices discovered during scanning.
  1. Bluetooth Scanning
  • startBluetoothScan(BuildContext context): Initiates the Bluetooth scan process and handles device discovery.
  • _startInitialScanAndShowDevicesDialog(BuildContext context): Starts the initial Bluetooth scan and displays a dialog showing scanning progress.
  • _showDevicesDialog(BuildContext context): Shows a dialog with a list of discovered Bluetooth devices, allowing the user to connect to a selected device.
  1. Device Connection
  • _disconnectDevice(BuildContext context): Disconnects the currently connected device.
  • sendData(String data): Sends data to the connected Bluetooth device.
  1. Dialogs and Feedback
  • _showConnectedDeviceDialog(BuildContext context): Displays information about the currently connected device.
  • Feedback through toast messages: Provides feedback to the user regarding connection status and operations (success or failure) using Fluttertoast.
  1. Permission Handling
  • Requests and handles location permission to enable Bluetooth scanning.
  1. Event Handling
  • Subscribes to Bluetooth scan results and stops scanning after a specified timeout.
  • Handles user interactions such as selecting a device to connect to.
  1. Service Discovery and Data Transmission
  • Discovers services and characteristics of the connected Bluetooth device.
  • Writes data to a writable characteristic of the connected device for data transmission.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages