Innovate with Sense HAT for Raspberry Pi por Dogan Ibrahim
The Sense HAT is an add-on board for Raspberry Pi, made especially for the Astro Pi mission – it launched to the International Space Station in December 2015 – and is now available to buy. The Sense HAT has an 8×8 RGB LED matrix, a five-button joystick. The Sense HAT is an official add-on board that adds a range of motion sensors to Raspberry Pi, including a gyroscope, accelerometer, and magnetometer, along with temperature, pressure, and humidity sensors. It also features an 8×8 LED matrix. The Raspberry Pi Sense HAT is attached on top of the Raspberry Pi via the 40 GPIO pins (which provide the data and power interface) to create an ‘Astro Pi’. The Sense HAT has several integrated circuit based sensors can be used for many different types of experiments, applications, and even games.
Estás por descargar Innovate with Sense HAT for Raspberry Pi en PDF, EPUB y otros formatos. Aquí lo puedes descargar gratis y completo, de manera sencilla. Sólo tienes que seguir las indicaciones.
El autor de este libro esDogan Ibrahim
Descripción
Sinopsis
Ready to explore the world around you? By attaching the Sense HAT to your Raspberry Pi, you can quickly and easily develop a variety of creative applications, useful experiments, and exciting games.The Sense HAT contains several helpful environmental sensors: temperature, humidity, pressure, accelerometer, magnetometer, and gyroscope. Additionally, an 8×8 LED matrix is provided with RGB LEDs, which can be used to display multi-color scrolling or fixed information, such as the sensor data. Use the small onboard joystick for games or applications that require user input. In Innovate with Sense HAT for Raspberry Pi, Dr. Dogan Ibrahim explains how to use the Sense HAT in Raspberry Pi Zero W-based projects. Using simple terms, he details how to incorporate the Sense HAT board in interesting visual and sensor-based projects. You can complete all the projects with other Raspberry Pi models without any modifications.Exploring with Sense HAT for Raspberry Pi includes projects featuring external hardware components in addition to the Sense HAT board. You will learn to connect the Sense HAT board to the Raspberry Pi using jumper wires so that some of the GPIO ports are free to be interfaced to external components, such as to buzzers, relays, LEDs, LCDs, motors, and other sensors.The book includes full program listings and detailed project descriptions. Complete circuit diagrams of the projects using external components are given where necessary. All the projects were developed using the latest version of the Python 3 programming language. You can easily download projects from the book’s web page. Let’s start exploring with Sense HAT.
Acerca de Dogan Ibrahim
Prof Dogan Ibrahim graduated from the University of Salford with First Class Honours in Electronic Engineering. He then completed an MSc course in Automatic Control Engineering at the University of Manchester, and PhD in Digital Signal Processing at the City University in London. Prof Ibrahim worked at several companies before returning to the academic life. He is currently a lecturer at the Department of Computer Information Systems at the Near East University. Prof Ibrahim is a Fellow of the IET, and a Chartered Electrical Engineer. His interests are in the fields of microcontroller based automatic control, digital signal processing, and computer aided design.Dogan Ibrahim has been Associate Professor and Head of Department at the Near East University, Cyprus, lecturer at South Bank University, London, Principal Research Engineer at GEC Hirst Research Centre, and is now a hardware and software systems consultant to London’s Traffic Control Systems Unit.
$1769.99
>>> Aquí GRATIS!!!<<<
También puedes ver otros Libros de Tecnología
Búsquedas relacionadas:
Innovate with Sense HAT for Raspberry Pi descargar epub gratis, Innovate with Sense HAT for Raspberry Pi completo sin registrarse, Innovate with Sense HAT for Raspberry Pi en pdf en español
Installation
In order to work correctly, the Sense HAT requires an up-to-date kernel, I2C to be enabled, and a few libraries to get started.
Ensure your APT package list is up-to-date:
Next, install the sense-hat package which will ensure the kernel is up-to-date, enable I2C, and install the necessary libraries and programs:
Finally, a reboot may be required if I2C was disabled or the kernel was not up-to-date prior to the install:
Hardware
Raspberry Pi Robot Hat
The schematics can be found here.
Software overview
After installation, example code can be found under /usr/src/sense-hat/examples
.
These can be copied to the user's home directory by running cp /usr/src/sense-hat/examples ~/ -a
.
The C/C++ examples can be compiled by running make
in the appropriate directory.
The RTIMULibDrive11 example comes pre-compiled to help ensure everything works as intended. It can be launched by running RTIMULibDrive11
and closed by pressing Ctrl+c
.
Python sense-hat
sense-hat
is the officially supported library for the Sense HAT; it provides access to all of the on-board sensors and the LED matrix.
Complete documentation can be found at pythonhosted.org/sense-hat.
RTIMULib
RTIMULib is a C++ and Python library that makes it easy to use 9-dof and 10-dof IMUs with embedded Linux systems. A pre-calibrated settings file is provided in /etc/RTIMULib.ini
, which is also copied and used by sense-hat
. The included examples look for RTIMULib.ini
in the current working directory, so you may wish to copy the file there to get more accurate data.
Other
LED matrix
The LED matrix is an RGB565 framebuffer with the id 'RPi-Sense FB'. The appropriate device node can be written to as a standard file or mmap-ed. The included 'snake' example shows how to access the framebuffer.
Joystick
The joystick comes up as an input event device named 'Raspberry Pi Sense HAT Joystick', mapped to the arrow keys and Enter
. It should be supported by any library which is capable of handling inputs, or directly through the evdev interface. Suitable libraries include SDL, pygame and python-evdev. The included 'snake' example shows how to access the joystick directly.
Calibration
Taken from this forum post.
Install the necessary software and run the calibration program as follows:
You will then see this menu:
Press lowercase m
. The following message will then show; press any key to start.
After it starts, you will see something similar to this scrolling up the screen:
Focus on the two lines at the very bottom of the screen, as these are the most recently posted measurements from the program.Now you have to move the Astro Pi around in every possible way you can think of. It helps if you unplug all non-essential cables to avoid clutter.
Try and get a complete circle in each of the pitch, roll and yaw axes. Take care not to accidentally eject the SD card while doing this. Spend a few minutes moving the Astro Pi, and stop when you find that the numbers are not changing anymore.
Now press lowercase s
then lowercase x
to exit the program. If you run the ls
command now, you'll see a new RTIMULib.ini
file has been created.
In addition to those steps, you can also do the ellipsoid fit by performing the steps above, but pressing e
instead of m
.
When you're done, copy the resulting RTIMULib.ini
to /etc/ and remove the local copy in ~/.config/sense_hat/
:
You are now done.
Updating the AVR firmware
Raspberry Pi Sound Hat
...
EEPROM data
These steps may not work on Raspberry Pi 2 Model B Rev 1.0 and Raspberry Pi 3 Model B boards. The firmware will take control of I2C0, causing the ID pins to be configured as inputs.
Enable I2C0 and I2C1 by adding the following line to
/boot/config.txt
:Enter the following command to reboot:
Download and build the flash tool:
Reading
EEPROM data can be read with the following command:
Writing
Please note that this operation is potentially dangerous, and is not needed for the everyday user. The steps below are provided for debugging purposes only. If an error occurs, the HAT may no longer be automatically detected.
Download EEPROM settings and build the
.eep
binary:Disable write protection:
Write the EEPROM data:
Re-enable write protection: