#Basic Hardware Tutorials
Kinoma Create and Kinoma Element support a number of hardware protocols. If you're new to working with hardware, you may want to start by reading the introductory tutorials. These provide the following:
- A description of the protocol
- Examples of sensors that use it
- A video demonstrating how to test a sensor using the Front Pins and Pin Explorer apps
- Information about the built-in BLL for the protocol
- Sample applications from our GitHub repository
- Information about how to use the Pins module to call functions in built-in/custom BLLs
If you're already familiar with hardware protocols, the basic sensor tutorials demonstrate how to interface Kinoma Create and Kinoma Element with specific types of sensors and walk through the code for a corresponding sample application.
##Introductory Protocol Tutorials
###Audio
Kinoma Create has a built-in microphone and speaker (an actuator and sensor) that make it easy to incorporate sound into projects. Like other sensors, KinomaJS provides access to audio output and input through the Hardware Pins API.
Common uses: playing and recording sound
###Analog Input
Analog pins are only configurable as input and can receive values anywhere between 0-3.3 volts, rather than just high or low. The value is reported back in the range of 0-1, inclusive.
Common uses: accelerometer, variable resistor sensors
Digital pins can be configured for either input or output. Once configured, the pin can take on a value of high or low voltage, which is represented in code as a 1 or 0 value.
Common uses: blinking led, physical buttons
###I2C
The I²C bus is a means of communicating with more complicated sensors and (especially) breakout boards — parts that have some intelligence of their own and can speak a more complicated language. Our I²C stack supports both raw I²C communication and SMB, which is used by many modern sensor breakouts.
Common uses: sensor breakouts, temperature, proximity
###PWM
Pulse Width Modulation is the equivalent of an analog output but achieved with a digital signal. The pin will output a square wave with varied widths of high vs. low values. By taking the average of these pulses of high and low, an artificial analog voltage results between 0-3.3v. This means that in code, the pins can be set to values between 0 and 1, inclusive.
Common uses: servo motors, rgb led
###Serial
The Rx (receive) and Tx (send) pins are used for serial/UART communication between the Kinoma Create and other devices. Such devices communicate using a common baud rate to send data back and forth.
Common uses: camera, thermal printer
###BLE
Kinoma Create version 2 includes Bluetooth Low Energy (a.k.a. BLE, Bluetooth Smart) support, allowing developers to build KinomaJS apps that connect to and control BLE peripherals. The KinomaJS BLE implementatation is provided by a built-in BLL module and accessed through the Pins module.
No introductory KinomaJS BLE tutorial is available; see the basic sensor tutorials to learn more
##Basic Sensor Tutorials
Note: These sensor tutorials only cover BLLs that run on actual devices, not simulator BLLs.
###Bluetooth LE
Combine the Kinoma Create with the Satechi IQ plug and build a clap on/clap off Bluetooth Low Energy controlled outlet switch.
Control the color of BLE Colorific Light Bulb using Kinoma Create's touch screen and built-in JavaScript BLE stack.
Build a KinomaJS app that interfaces with the Griffin PowerMate Bluetooth Button.
Connect the Miselu Keyboard to an app on the Kinoma Create that allows you to play notes from the keyboard to the audio output on the Create.
In this example we show how to control the wireless Satechi BLE IQ Plug from Kinoma Create.
###Audio
Demonstrates how to record and play up to 30 seconds of audio on Kinoma Create’s built-in microphone and speaker.
###Analog
Draw lines on the Kinoma Create screen using potentiometers, and erase your drawing with a shake gesture interpreted by an accelerometer. Uses analog input for both!
Read an analog sensor and use the HTTPClient module to make requests to a web service.
Stripped down app that prints a value from an analog input onto the Kinoma Create's screen. Start here to learn how to use Analog Input.
Plots the reading from any analog sensor in realtime.
###Digital
Uses a digital pin to read input from a physical button. When pressed, it triggers an event in the application which removes a letter from the string 'Hello World!' on the Kinoma Create's screen. Start here to learn how to use Digital Input.
Uses a digital pin to turn on and off an LED when a button is pressed on screen. Start here to learn how to use Digital Output.
A demonstration of making a companion app for a Kinoma Create project, implementing communication between an iOS app and the Kinoma Create via WebSockets. Uses Digital Output to turn an LED on and off on the Kinoma Create.
###I2C
Fills the Kinoma Create's screen with the color sensed by an RGB color sensor. Uses Digital Output to turn the color sensor's LED on and off.
Obtains the current temperature from an I²C temperature sensor and displays it on the Kinoma Create screen.
Change color of an LED based on the current temprerature.
###PWM
Rotates a continuous servo using a PWM pin.
Uses red/green/blue sliders to control the color of an RGB LED. The LED is controlled by PWM pins.
###Serial
Captures and displays photographs on the screen when a button is pressed. Uses Digital Input to monitor the button.