Microcontroller Prototypes with Arduino and a 3D Printer. Dimosthenis E. Bolanakis
Читать онлайн книгу.Uno and E...Figure 1.9 Uploading the new firmware code to μC's memory through the Arduin...Figure 1.10 PCB silkscreen of the Arduino Uno stackable headers and the μC's...Figure 1.11 A drone is built around sensors, actuators, and interfaces.
2 Chapter 2Figure 2.1 Example of a 16‐bit register in μC’s memory.Figure 2.2 Two’s (2’s) complement geometrical representation of a 4‐bit bina...Figure 2.3 Arduino Uno board connected to the USB port of a laptop (using ty...Figure 2.4 Arduino Ex.2–1a: output data from the μC to a computer through UA...Figure 2.5 RS 232 terminal consoles: (a) Arduino serial monitor. (b) Termite...Figure 2.6 Arduino Ex.2–1b: (a) SRAM‐memory and (b) Flash‐memory strings....Figure 2.7 Arduino Ex.2–2: datatypes length and typecasting. (a) source code...Figure 2.8 Control flow statements in Arduino (and embedded C) programming. ...Figure 2.9 Flowchart of the for() loop example given in Figure 2.14m.Figure 2.10 Flowchart of the do…while() loop example given in Figure 2...Figure 2.11 (a) Arduino Ex.2–3: for() & while() statements and variable scop...Figure 2.12 Arduino Ex.2–4: for() statement and Boolean operators (upper/low...Figure 2.13 Arduino Ex.2–5: input data to the μC from a computer through UAR...Figure 2.14 Printed results of the original version (and some revisions) of ...Figure 2.15 Arduino Ex.2–6a: arithmetic operations (numeric string to binary...Figure 2.16 Transforming a numeric string to binary value (“128”→128). (a) t...Figure 2.17 Arduino Ex.2–6b: arithmetic operations (binary value to numeric ...Figure 2.18 Transforming a binary value to BCD in reversed order (254→“452”)...Figure 2.19 Arduino Ex.2–7: bitwise operations (unsigned byte to signed byte...Figure 2.20 Bitwise AND, OR, XOR with bitmasks. (a) bitwise AND (b) bitwise ...Figure 2.21 Converting the array elements from BCD to ASCII and printing the...Figure 2.22 Bit‐shift left (<<) and right (>>) of a binary v...Figure 2.23 Three positions bit‐shift left and right (i.e. multiply an...Figure 2.24 Function declaration in Arduino (and Embedded C) programming. (a...Figure 2.25 Arduino Ex.2–8: code decomposition with functions (as applied to...Figure 2.26 Arduino Ex.2–8b: code decomposition with functions and macros. (...
3 Chapter 3Figure 3.1 Pin interface with the outside world: OUTPUT DATA. (a) LED on Ard...Figure 3.2 Blinking LED with user‐defined function and macro. (a) firmware c...Figure 3.3 Pin arrangement in an Arduino Uno board (port B, port C, and port...Figure 3.4 Blinking LED through the direct manipulation of the port register...Figure 3.5 Waveforms on PB5 pin (blinking LED without the one second delay)....Figure 3.6 Concurrent vs. sequential manipulation of the μC’s port pins. (a)...Figure 3.7 Pin interface with the outside world: INPUT DATA. (a) release pus...Figure 3.8 Debounce the spurious switch (open/close) transitions. (a) connec...Figure 3.9 Reading the switch state through the direct manipulation of PINB ...Figure 3.10 Analog signal and PWM arrangement in an Arduino Uno board. (a) e...Figure 3.11 ADC and PWM pin arrangement in an Arduino Uno board.Figure 3.12 Reading the switch state through the analog input pin A0. (a) ha...Figure 3.13 Reading the 3V3 power on an Arduino Uno board through the analog...Figure 3.14 PWM on PIN3 on an Arduino Uno board (data acquisition though PIN...Figure 3.15 PWM on PIN3 (data acquisition though oscilloscope). (a) connecti...Figure 3.16 External interrupt pins on an Arduino Uno board.Figure 3.17 Update DC of the PWM wave on PIN3 via the external interrupt on ...Figure 3.18 Switch bounce on the external interrupt PIN2. (a) hardware setup...Figure 3.19 UART connection of a μC to a μC, module, or computer (8N1 frame)...Figure 3.20 UART hardware interface on an Arduino Uno board (pinout and data...Figure 3.21 Third‐party tools for the Arduino Uno board (FTDI click by Mikro...Figure 3.22 UART hardware interface on an Arduino Uno using third‐party tool...Figure 3.23 Software‐implemented UART on an Arduino Uno board (SoftwareSeria...Figure 3.24 SPI hardware topology and read/write timing diagrams (four modes...Figure 3.25 SPI single‐byte read of the chip id of BME280 sensor device. (a)...Figure 3.26 SPI single‐byte read of the chip id of BME280 sensor device (tim...Figure 3.27 SPI single‐byte write and read (BME280 register 0xF4, aka “ctrl_...Figure 3.28 SPI multiple‐byte read (BME280 temperature coefficients 0x88‐0x8...Figure 3.29 BME280: obtain temperature (T), humidity (H), and pressure (P) t...Figure 3.30 BME280 SPI functions (1 of 3).Figure 3.31 BME280 SPI functions (2 of 3).Figure 3.32 BME280 SPI functions (3 of 3).Figure 3.33 Header file of the custom‐designed SPI library (swSPI.h).Figure 3.34 Source code file of the custom‐designed SPI library (swSPI.cpp –...Figure 3.35 Source code file of the custom‐designed SPI library (swSPI.cpp –...Figure 3.36 swSPI single‐byte read of the chip id of BME280 sensor device. (...Figure 3.37 SCLK period of the swSPI library. (a) SPI clock period using 100...Figure 3.38 BME280: obtain temperature, humidity, and pressure through the s...Figure 3.39 I2C hardware topology and read/write timing diagrams. (a) connec...Figure 3.40 I2C hardware interface (Arduino Uno and BME280/click shield pino...Figure 3.41 I2C single‐byte read of the chip id of BME280 sensor (code and t...Figure 3.42 I2C single‐byte write and read code (BME280 register 0xF4, aka “...Figure 3.43 I2C single‐byte write and read timing diagrams (BME280 “ctrl_mea...Figure 3.44 I2C multiple‐byte read (BME280 temperature coefficients 0x88–0x8...Figure 3.45 BME280: obtain Temperature (T), Humidity (H), and Pressure(P) th...Figure 3.46 BME280 I2C functions (1 of 3).Figure 3.47 BME280 I2C functions (2 of 3).Figure 3.48 BME280 I2C functions (3 of 3).Figure 3.49 Header file of the custom‐designed I2C library (swWire.h).Figure 3.50 Source code file of the custom‐designed I2C library (swWire.cpp ...Figure 3.51 Source code file of the custom‐designed I2C library (swWire.cpp ...Figure 3.52 Source code file of the custom‐designed I2C library (swWire.cpp ...Figure 3.53 Source code file of the custom‐designed I2C library (swWire.cpp ...Figure 3.54 swWire single‐byte read of the chip id of BME280 sensor device. ...Figure 3.55 SCL max frequency of the swWire library on an Arduino Uno board....Figure 3.56 BME280: obtain temperature, humidity, and pressure through the s...Figure 3.57 BME280 revised driver (1 of 3).Figure 3.58 BME280 revised driver (2 of 3).Figure 3.59 BME280 revised driver (3 of 3).
4 Chapter 4Figure 4.1 Amendments to the BME280 driver of the built‐in I2C interface. (a...Figure 4.2 DAQ measurement hardware and firmware (air pressure with BME280 s...Figure 4.3 Pulse on PINA3 (DAQpin) for measuring the time of DAQ process. (a...Figure 4.4 Header file Serial.h for the communication with the PC serial por...Figure 4.5 Header file Serial.h for the communication with the PC serial por...Figure 4.6 DAQ software for the communication with the PC serial port (Seria...Figure 4.7 Arduino Uno connected to COM11 serial port (Windows Device Manage...Figure 4.8 Compilation and execution of the DAQ software.Figure 4.9 Enrichment of the DAQ software Serial_Ex4_01.c to store data to a...Figure 4.10 Free Serial Port Monitor tool for inspecting the data exchanged ...Figure 4.11 DAQ software with graphical monitoring feature (Serial_Ex4_01‐gn...Figure 4.12 Compilation and execution of the Serial_Ex4_01‐gnuplot.c D...Figure 4.13 DAQ measurement hardware and firmware (reading data from two sen...Figure 4.14 DAQ with data monitoring acquired by 2 sensors (Serial_Ex4_02‐gn...Figure 4.15 Teensy 3.2 USB development board (Top and Bottom view).Figure 4.16 Getting started with Teensy 3.2 board (example firmware). (a) fi...Figure 4.17 BNO055+BMP280 Pesky module for Teensy 3.2 motherboard. (a) the P...Figure 4.18 Reading air pressure from BMP280 sensor of Pesky’s module (with ...Figure 4.19 3D orientation of BNO055 device using Euler angles. (a) referenc...Figure 4.20 Gimbal lock phenomenon in Euler angles. (a) independent gimbals....Figure 4.21 BNO055 driver (using the built‐in I2C).Figure 4.22 Orientation detection expressed with Euler angles. (a) applicati...Figure 4.23 Gesture and motion detection firmware.Figure 4.24 Gesture detecting sleeve and gesture types. (a) the various type...Figure 4.25 Gesture detection via Gravity Vector (gestures aligned with the ...Figure 4.26 Gesture recognition graphs.Figure 4.27 Gesture recognition example toward steering an RC car. (a) plot ...Figure 4.28 Motion detection via Linear Acceleration. (a) reference position...Figure 4.29 Motion detection (Linear Acceleration) graphs and revised firmwa...Figure 4.30 Fusing Linear Acceleration and Barometric Altitude toward absolu...Figure 4.31 Updated firmware and DAQ running for Euler angles, Gravity, Line...Figure 4.32 DAQ software for acquiring Euler angles, Gravity, and Linear Acc...Figure 4.33 Compilation and execution of the Open GL example code. (a) real‐...Figure 4.34 Open GL example applying to Euler angles (1 of 2).Figure 4.35 Open GL example applying to Euler