diff --git a/Digital/README.md b/Digital/README.md index 76e8707..7d2a2f5 100644 --- a/Digital/README.md +++ b/Digital/README.md @@ -31,7 +31,7 @@ Digital sensors detect clear changes (like pressing a button), while digital out ![](../Images/25.png) -This sensor reads the input from the physical world. +This sensor detects when it is touched. It sends an ON signal when touched and OFF when released. --- @@ -43,19 +43,19 @@ This sensor reads the input from the physical world. ![](../Images/21.png) -This sensor reads the input from the physical world. +This sensor detects when the button is pressed. It sends an ON signal while the button is held down. --- ### Module 03: Photo Interrupter -![Image](../Images/.png) +![](../Images/34.png) #### Block: ![](../Images/23.png) -This sensor reads the input from the physical world. +This sensor detects if something passes between its light beam. It is commonly used to count or detect movement. --- @@ -67,7 +67,7 @@ This sensor reads the input from the physical world. ![](../Images/24.png) -This sensor reads the input from the physical world. +This sensor detects tilt or angle changes. It sends an ON signal when tilted beyond a certain point. --- @@ -79,9 +79,13 @@ This sensor reads the input from the physical world. ![](../Images/26.png) +This block reads the **temperature** from the environment. + #### Block 2: -![](../Images/26.png) +![](../Images/27.png) + +This block reads the **humidity** (moisture in the air). --- @@ -93,10 +97,14 @@ This sensor reads the input from the physical world. ![](../Images/29.png) +This block turns the LED ON or OFF using a **true/false** value. + #### Block 2: ![](../Images/32.png) +This block adjusts the LED brightness by entering a value between **0 and 1023**. + --- ### Module 07: Buzzer @@ -107,19 +115,24 @@ This sensor reads the input from the physical world. ![](../Images/28.png) +This block turns the buzzer ON or OFF using a **true/false** value. + #### Block 2: ![](../Images/31.png) +This block changes the buzzer’s sound level using a value between **0 and 1023**. + --- ### Module 08: Relay -![Image](../Images/.png) - +![](../Images/33.png) #### Block: ![](../Images/30.png) +This block controls the relay like a switch—**ON or OFF**—allowing you to turn other devices on or off through the relay. + --- diff --git a/Downloads/Blue_I2C.ubl b/Downloads/Blue_I2C.ubl index d1c5d49..987b853 100644 --- a/Downloads/Blue_I2C.ubl +++ b/Downloads/Blue_I2C.ubl @@ -1,13 +1,10 @@ module Spark_I2C 'cat;Output' author FABLAB version 1 1 -depends '_Gesture (PAJ7620)' choices direction clockwise 'counter-clockwise' description '' variables Gesture - spec 'r' 'Gesture Read' 'Gesture Read' - space spec ' ' 'Motor Driver A' 'Motor Driver A Direction _ Speed _' 'menu.direction num' 'clockwise' 10 spec ' ' 'Motor Driver B' 'Motor Driver B Direction _ Speed _' 'menu.direction num' 'clockwise' 10 spec 'r' '_Direction' '_Motor Direction _' 'menu.direction' '10' @@ -20,10 +17,6 @@ to Direction Direction { } } -to 'Gesture Read' { - return ('paj7620 read') -} - to 'Motor Driver A' Direction Speed { if ((Direction Direction) == (booleanConstant true)) { i2cSet 0 1 Speed diff --git a/Downloads/Yellow_PWM.ubl b/Downloads/Yellow_PWM.ubl index 5775880..73c9f43 100644 --- a/Downloads/Yellow_PWM.ubl +++ b/Downloads/Yellow_PWM.ubl @@ -1,7 +1,6 @@ module Spark_PWM 'cat;Control' author 'FABLAB BH' version 1 1 -depends _Servo choices PWM_pins '1' '9' choices PWM_pins2 '3' '4' '6' '7' '8' choices direction clockwise 'counter-clockwise' @@ -16,9 +15,7 @@ description '' space spec ' ' 'Fan Motor' 'Fan Motor Pin _ Direction _ Speed _ (0-100)' 'menu.PWM_pins menu.direction num' 1 'clockwise' 50 spec ' ' 'Fan Motor2' 'Fan Motor Pin _ Direction _ Speed _ (0-1023)' 'menu.PWM_pins menu.direction num' 1 'clockwise' 50 - space - spec ' ' 'Servo' 'Servo Motor Pin _ Speed _ (-100 to 100)' 'menu.servo_pins num' 33 50 - spec ' ' 'Servo Motor Pin' 'Servo Motor Pin _ Degrees _ (-90 to 90)' 'menu.servo_pins num' 33 90 + to Direction Direction { if (Direction == ('[data:toString]' 'counter-clockwise')) { @@ -91,12 +88,3 @@ to 'Fan Motor4' Pin Speed { to 'PWM Pin' Pin { return (at Pin ('[data:makeList]' 13 0 26 27 0 23 16 5 18)) } - -to Servo Pin Speed { - setServoSpeed Pin Speed -} - -to 'Servo Motor Pin' Pin Degrees { - setServoAngle Pin Degrees -} - diff --git a/I2C/README.md b/I2C/README.md new file mode 100644 index 0000000..0da2443 --- /dev/null +++ b/I2C/README.md @@ -0,0 +1,32 @@ +# 🟦 I2C + +### What is I2C? + +I2C (Inter-Integrated Circuit) is a communication protocol that allows multiple sensors and modules to connect using just **two wires**—one for data (SDA) and one for clock (SCL). +It’s especially useful for connecting devices like screens, motor drivers, or environmental sensors that need to **send and receive data**. + +--- + +### Included Modules: + +- [Motor Driver](#module-01-motor-driver) + +--- + +### Module 01: Motor Driver + +![Image](../Images/.png) + +#### Block A: + +![](../Images/35.png) + +This block is used to control **Motor A**. + +#### Block B: + +![](../Images/36.png) + +This block is used to control **Motor B**. + +--- diff --git a/Images/33.png b/Images/33.png new file mode 100644 index 0000000..df26ff2 Binary files /dev/null and b/Images/33.png differ diff --git a/Images/34.png b/Images/34.png new file mode 100644 index 0000000..30d653e Binary files /dev/null and b/Images/34.png differ diff --git a/Images/35.png b/Images/35.png new file mode 100644 index 0000000..269319d Binary files /dev/null and b/Images/35.png differ diff --git a/Images/36.png b/Images/36.png new file mode 100644 index 0000000..757308f Binary files /dev/null and b/Images/36.png differ diff --git a/README.md b/README.md index 6de57d4..bf8eb57 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Some modules had more than one function (like color + brightness), making it tri |------------------------|--------------------|----------------------------------|--------------------------|----------------------------------| | LED | Film Pressure | OLED Display (Copied) | Fan Motor | Ultrasonic (Dependencies) | | Buzzer | Photoresistor | Motor Driver | Servo (Dependencies) | RGB LED | -| Horn | Potentiometer | Gesture Sensor (Dependencies) | — | Traffic Light | +| Horn | Potentiometer | — | — | Traffic Light | | Touch Sensor | Steam Sensor | — | — | — | | Button Input | — | — | — | — | | Photo Interrupter | — | — | — | — |