Cheat Sheet
Cheat Sheet
TERMINOLOGY
DragonBoard 410c
● GPIO: General purpose input/output
● MPP: Multi-purpose pins
● I2C: Inter-integrated circuit
● SPI: Serial Peripheral Interface
● PCM: Pulse-code Modulation
● UART: Universal asynchronous receiver/transmitter
● HDMI: High-Definition multimedia interface
● USB: Universal Serial Bus
● MicroUSB: Micro Universal Serial Bus
● MicroSD: Micro Secure Digital
● DC Power Adapter: Direct Current
● eMMC: Embedded Multimedia Card
● RAM: Random Access Memory
● WiFi: Branding term that beat out IEEE 802.11
● GPS: Global Positioning System
● ARM: Advanced RISC Machine
● RISC: Reduced Instruction Set Computer
General
• LED - Light-Emitting Diode - A device that emits light once enough power is supplied
• PCB - Printed Circuit Board - A board that connects electronic components through conductive
paths
• BB - Breadboard - Similar to a PCB except uses wires instead of conductive paths to connect
electronic components
• IC - Integrated Circuit (chips) - Also known as a chip/microchip, is electronic component made up of
many smaller electronic parts (i.e. the NTE987 amplifier chip)
• IR - Infrared - Electromagnetic radiation (or radiant energy) with longer wavelengths than light
(invisible to human eyes), has many applications in modern technology
• PIR - Passive Infrared - Sensor that measures IR light around it (mostly motion detection)
• SDK - Software Development Kit - Software developing tools used to create applications for a
certain software/hardware platform (i.e. Android)
• UI - User Interface - the means by which the user and a computer system interact, in particular the
use of input devices and software.
• GUI - Graphical User Interface - Allows a user to interact with software/hardware through visual
icons/indicators instead of text based
DRAGONBOARD 410C CHEATSHEET - FUNCTIONALITY
GPIO
Terminal access
Android
cd /Library/Android/sdk/platform-tools
./adb devices
./adb shell
su
cd /sys/class/gpio
echo 935 > export
cd gpio935
echo out > direction
echo 1 > value
Ubuntu
sudo su
cd /sys/class/gpio
echo 33 > export
cd gpio33
echo out > direction
echo 1 > value
OPERATIONAL AMPLIFIER
Ideal transfer function
Calculations
NTE987 diagram
Options
Build
STEPPER MOTOR
H-Bridge IC chip
Sequence
IR SENSING
Area of detection
Sockets
● Bluetooth Sockets (Android) ○ BluetoothServerSocket
■ Listening Bluetooth Socket (Server) ○ BluetoothSocket
■ Connected/ Connecting Bluetooth Socket (Client)
● RFCOMM/SSP - Connection Oriented
Remote vs Receiver
Bluetooth Remote
○ Send messages/ signals to the Receiver
○ Utilizes a BluetoothSocket
Bluetooth Receiver
○ Receive messages/ signals from the Remote
■ Parses messages/ signals and notifies GpioProcessor
○ Utilizes BluetoothServerSocket + BluetoothSocket
Android
Setup Bluetooth
1. Get Bluetooth adapter
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (mBluetoothAdapter == null) {
// Device does not support Bluetooth
}
2. Enable Bluetooth
if (!mBluetoothAdapter.isEnabled()) {
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}
Query paired devices
Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
if (pairedDevices.size() > 0) {
// There are paired devices. Get the name and address of each paired device.
for (BluetoothDevice device : pairedDevices) {
String deviceName = device.getName();
String deviceHardwareAddress = device.getAddress(); // MAC address
}
}
Discover devices
@Override
protected void onCreate(Bundle savedInstanceState) {
...
@Override
protected void onDestroy() {
super.onDestroy();
...
// Don't forget to unregister the ACTION_FOUND receiver.
unregisterReceiver(mReceiver);
}
BluetoothAdapter
Represents the local Bluetooth adapter (Bluetooth radio). The BluetoothAdapter is the entry-point for
all Bluetooth interaction. Using this, you can discover other Bluetooth devices, query a list of bonded
(paired) devices, instantiate a BluetoothDevice using a known MAC address, and create a
BluetoothServerSocket to listen for communications from other devices.
BluetoothDevice
Represents a remote Bluetooth device. Use this to request a connection with a remote device through
a BluetoothSocket or query information about the device such as its name, address, class, and
bonding state.
BluetoothSocket
Represents the interface for a Bluetooth socket (similar to a TCP Socket). This is the connection point
that allows an application to exchange data with another Bluetooth device using InputStream and
OutputStream.
BluetoothServerSocket
Represents an open server socket that listens for incoming requests (similar to a TCP ServerSocket).
In order to connect two Android devices, one device must open a server socket with this class. When
a remote Bluetooth device makes a connection request to this device, the device accepts the
connection, then returns a connected BluetoothSocket.
BluetoothClass
Describes the general characteristics and capabilities of a Bluetooth device. This is a read-only set of
properties that defines the device's classes and services. Although this information provides a useful
hint regarding a device's type, the attributes of this class don't necessarily describe all Bluetooth
profiles and services that the device supports.
BluetoothProfile
An interface that represents a Bluetooth profile. A Bluetooth profile is a wireless interface specification
for Bluetooth-based communication between devices. An example is the Hands-Free profile. For more
discussion of profiles, see Working with Profiles.
BluetoothHeadset
Provides support for Bluetooth headsets to be used with mobile phones. This includes both the
Bluetooth Headset profile and the Hands-Free (v1.5) profile.
BluetoothA2dp
Defines how high-quality audio can be streamed from one device to another over a Bluetooth
connection using the Advanced Audio Distribution Profile (A2DP).
BluetoothHealth
Represents a Health Device Profile proxy that controls the Bluetooth service.
BluetoothHealthCallback
An abstract class that you use to implement BluetoothHealth callbacks. You must extend this class
and implement the callback methods to receive updates about changes in the application’s
registration state and Bluetooth channel state.
BluetoothHealthAppConfiguration
Represents an application configuration that the Bluetooth Health third-party application registers to
communicate with a remote Bluetooth health device.
BluetoothProfile.ServiceListener
An interface that notifies BluetoothProfile interprocess communication (IPC) clients when they have
been connected to or disconnected from the internal service that runs a particular profile.