adafruit 1.44 color tft lcd display raspberry pi made in china

The TFT display is a kind of liquid crystal LCD that is connected to each pixel using a transistor, and it features low current consumption, high-quality, high-resolution and backlight. This 1.44-inch full color LCD has a narrow PCB display. The resolution is 128×128 pixels, and it has a four-wire SPI interface and a white backlight.

adafruit 1.44 color tft lcd display raspberry pi made in china

The ST7789 TFT module contains a display controller with the same name: ST7789. It’s a color display that uses SPI interface protocol and requires 3, 4 or 5 control pins, it’s low cost and easy to use. This display is an IPS display, it comes in different sizes (1.3″, 1.54″ …) but all of them should have the same resolution of 240×240 pixel, this means it has 57600 pixels. This module works with 3.3V only and it doesn’t support 5V (not 5V tolerant).

The ST7789 display module shown in project circuit diagram has 7 pins: (from right to left): GND (ground), VCC, SCL (serial clock), SDA (serial data), RES (reset), DC (or D/C: data/command) and BLK (back light).

As mentioned above, the ST7789 TFT display controller works with 3.3V only (power supply and control lines). The display module is supplied with 3.3V (between VCC and GND) which comes from the Arduino board.

To connect the Arduino to the display module, I used voltage divider for each line which means there are 4 voltage dividers. Each voltage divider consists of 2.2k and 3.3k resistors, this drops the 5V into 3V which is sufficient.

The first library is a driver for the ST7789 TFT display which can be installed from Arduino IDE library manager (Sketch —> Include Library —> Manage Libraries …, in the search box write “st7789” and install the one from Adafruit).

testdrawtext("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a tortor imperdiet posuere. ", ST77XX_WHITE);

testdrawtext("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a tortor imperdiet posuere. ",ST77XX_WHITE);

adafruit 1.44 color tft lcd display raspberry pi made in china

Project Theiais a low-cost, low-connectivity IoT platform designed for developing countries with minimal healthcare infrastructure, disrupted (or substandard) telecommunications networks, and a limited real-time national health data system. Often the countries with the most limited healthcare systems are also those with the smallest real-time health data, which could allow them to spend their limited healthcare resources where they are most needed. Using long-distance IoT radios, modern data collection and analytics frameworks, and low-cost components, Theia creates an immediate, on-the-ground emergency health network that offers a national level, if simplistic, real-time health data layer. When implemented, Theia would allow a developing countries healthcare system to make more intelligent decisions on where to deploy, enabling a country to triage its COVID-19 response effectively, focusing on the belief that "something is better than nothing" in light of a global pandemic involving countries with far too little real-time health data mapping.

We are Karakoram, a global, distributed, volunteer developmental innovation team that disrupts conventional thinking and builds solutions to the world"s toughest challenges. We use rapid prototyping and Agile production methods to create everything from physical and digital platforms, organizational design, and experimental policy. Over the past three months, our team has designed Project Theia as a multiple product IoT platform that both detects individual temperatures on the ground with a fully developed contactless smart thermometer and FLIR camera paired a custom IoT analytics and reporting hub.

This platform functions by having one, or more, of the Theia Thermometers in use throughout a community that may be at risk within a developing country, capturing data points of the local population while checking for fevers on the ground. While a single temperature reading is not indicative of COVID-19, with several unrelated reasons that a person might have a fever, a change in the mean average of an entire community is indicative of a more infectious disease circulating amongst the target group. Each thermometer has a built-in "LoRa" (Long Range) IoT radio capable of sending data over 2km to the Hub.

Our project-theory is that with the use of multiple Theia Thermometers and Theia Hubs, a developing country with limited healthcare services would have the necessary real-time data on where average mean temperatures are increasing nationally. Project Theia offers the ability to distribute limited healthcare services intelligently, without the need for established telecommunication networks (3G/4G/WiFi, etc.) or traditional track and trace methods.

We designed Theia to address several observed deficiencies in some developing countries COVID-19 strategy:A limited healthcare system cannot be everywhere at once.

Much of the Theia Thermometer electronics revolve around how they connect into the Adafruit Feather mainboard. While it is possible to solder all of these connections onto a perf or stripboard, we"ve made it significantly easier by creating a custom PCB for a daughterboard that can easily be printed by professional PCB manufacturers and either assembled by the pros (PCBA) or shipped back unassembled (PCB) and through-hole mount assembled by you. Ours were manufactured byPCBWay, who offered to sponsor the production of our boards and were fantastic partners on this project. Not only because they were kind enough to support us for this challenge, but also because their printing is some of the best I’ve seen in a while, I"d recommend them for this type of project!

Now that you have your Adafruit Feather & Karakoram Daughterboard paired, there is a small amount of work to be done to prepare our smart thermometer to be assembled.We need to run power and data lines from the Adafruit Feather to the external case by splicing a generic micro-USB cable to the female USB breakout board. After completing this, plug the male end of the spliced micro-USB cable into the feather.

The next part of our platform build is to create the Theia Hub, which receives LoRa radio transmission, records them, and hosts a front-end for calculating and distributing signs of a viral bloom. The critical parts for this build are:A Raspberry Pi Model B+ or newer

We have built the Theia Thermometer as both a contactless thermometer and a low-cost FLIR camera. However, V1 of the software does not include the thermal camera FLIR functionality due to current incompatibilities in the firmware needed for RadioHead RH95.h LoRa radio library and SPIxx.h, the accelerated SPI library needed for interpolating pixels in the thermal camera. We aim to release a V2 software in the coming month that allows for both FLIR camera and RadioHead functionality. In V1 we have therefore turned off the FLIR functionality in order to focus on mission-critical functionality including accurate contactless temperature capture and transmission to the Theia Hub over LoRa.Initial Setup:

After flashing the OS to the SD card, re-mount the card on your main computer by physically removing and re-inserting it. Next, create an empty directory calledsshat the root of the SD card - this enables SSH access which we’ll need later to connect remotely to the Pi.

Determine the auto-assigned IP address of the Pi by logging in to your router interface (see a guide on finding your router IP address:here) and navigating to LAN / DHCP settings. The pi should be namedraspberrypi.

The first thing we should do before installing the Hub software to the Raspberry Pi is making sure that all the currently installed packages are up to date. We can upgrade all installed packages by running the following two commands.sudo apt update

sudo apt upgradeInstall Python3, which is needed to run our script.sudo apt-get install python3-pipThe next thing we need to do is prepare the Pi to use the LoRa chip on the shield.sudo raspi-configNavigate tointerfacing optionsand select enable theSPI interface.

Save the changes and get back to the terminal window and then install the RPi.GPIO package using the following command.pip install RPi.GPIOInstall the spidev package using the following command. Spidev is a python binding for Linux which can be used to perform SPI communication on Raspberry Pi.pip install spidevNext lets install the pyLoRa package using the following pip command. This package installs the Radio models associated with LoRa.pip install pyLoRaNext lets install Screen, in order to keep our python code running in the background:sudo apt-get install screenNext lets install Git so we can easily get code from the Karakoram Github repo.sudo apt-get install gitNow with all our libraries and housekeeping installs done, on to our software installs.

sudo systemctl enable influxdbNow that everything has been set up, we can now proceed to start up InfluxDB on our Raspberry Pi.sudo systemctl start influxdbSet up InfluxDB for Theia Hub

If you’re not already in the command-line tool, launch it by typing:influx(you should still be in it from the previous step, but just in case you exited out for some reason)

Within this interface, we can create a user that will have full access to the database. This user will act as our admin account. To create this admin user, run the following command within InfluxDB’s CLI tool. Make sure that you replacewith a secure password of your choice.CREATE USER admin WITH PASSWORD "" WITH ALL PRIVILEGESYou now have a new user called ‘admin’ with your chosen password with all privileges. With that done, you can now exit out of InfluxDB by typing inexitand pressingENTER.

Create a Theia directory on the Pi by typing :mkdir TheiaGo into the directory by typing:cd TheiaWe need the get theTheia.pyand a dependent library called SX127x to control the LoRa radio chip on the Pi.

Clone theTheia.pyandSX127xLoRa library from GitHub with:git clone by typing:chmod +x Theia.pyMost of the script is ready to go out of the box, but there are a few lines you need to update in in order to make it work with your details and LoRa transmission frequency. You can change this in your favorite code editor, or even on the Pi with nano

LaunchTheia.pyby typing:python3 Theia.pyNow whenever the Theia Thermometer captures a reading, it should automatically print the temperature to screen, as well as record the reading into InfluxDB.

LaunchTheia.pyby typing:python3 Theia.pyDetach from the screen by typingCTRL + Aand thenD. You should return to the main shell and now haveTheia.pyrunning in the background!

If you need to reattach to the screen for some reason, list the current screens by typingscreen -ls. Reattach to whatever you find by typing:screen -r .

Grafana is our web front-end, which not only displays the anonymized temperature readings from the Theia Thermometer but also gives us the ability to manipulate the data and give us our Community Average.

sudo dpkg -i grafana_6.6.1_armhf.debWe need to get Grafana to start at startup. Luckily for us, Grafana comes with a systemd service file.sudo systemctl enable grafana-serverStart the Grafana web server by typing:sudo systemctl start grafana-serverGrafana Web Portal

Next, we need to access the Grafana Web Portal using the Pi’s local IP address. This is the same address you used earlier to SSH in, but in case you forgot it for some reason you can get the IP address assigned to the pi by running the following command:hostname -IWith your IP address handy, go to the following web address using a web browser on your computer. Grafana’s web interface sits, by default, on port 3000 of your Raspberry Pi’s IP address.http://:3000The first thing you will see when loading up Grafana is a login screen. On this screen, you will be able to login using the default admin user. The username for this user is “admin” and the password is “admin“. We can change this super insecure password in the next step.

Now we are required to enter the details of our InfluxDB installation. First we need to add our InfluxDB URL. In our case because the database is on the same Pi we’re running Grafana on, we use the following URL:http://localhost:8086Next, we will need to enter the InfluxDB Details as follows:Database: Theia

That"s it, you’re done!Now you should be able to capture temperatures using the Theia thermometer, and they should both write to, and record the data in real-time to InfluxDB and display in Grafana.

We have included the AMG8833 thermal camera as part of our build. Initially, we had planned to include a low resolution/low-cost FLIR camera as part of our product. However, the enhanced SPI firmware needed to operate the interpolated 64x64 FLIR camera (upsampled from the 8x8 AMC8833) is directly inoperable with the default SPI firmware required by the RadioHead LoRa library.

We believe thatTheiais the most effective solution to giving a developing country, with limited healthcare services, and often without a reliable telecommunication network, to triage their COVID-19 outbreaks, sending doctors and nurses where they are most needed.