This assume you are sending the random data stream from the Pi.
pigpio waves will do what you want as long as you do not need better than 1 µs resolution.
For Python see wave_add_generic.
Perhaps have a look at the morse code example to get an idea of the sort of code you will need to write.
If you just want to view a random data stream sent to the Pi ...
How Can Rpi3B+ Detect MQ9 Gas Sensor's Carbon Monoxide Leakage,
Without Using ADC?
Understanding MQ9's Digital and Analog signals
MQ9 has both a Digital and an Analog output signal, as summarized below:
(a) Digital - To detect gas leakage or no leakage, outputting High level 4.8V, or Low, 0.2V, respectively.
(b) Analog - ...
You can use a Arduino NANO for taking the MQ9 reading. Raspberry pi has no ADC inside so you have to get the value like this. Or use some sort of voltage detector(detects voltage and give us a certain value) that can digitise the values.
The BMP180 is a digital device and connects via the I2C bus.
The MQ9 is an analogue device and produces a variable voltage. It can not be directly connected to the Pi.
You need to connect the MQ9 to an ADC (Analogue to Digital Converter) and connect the ADC to the Pi.
ADCs tend to have an I2C or a SPI interface. The choice is yours.
How to talk to an ST7789 LCD connected to SPI #1?
For those with little experience of rewiring delicate ribbon cables, perhaps the follow 12 pin breakout version (Ref 8)is worth trying:
I think we need to do two things:
(1) Change ST7789 LCD's CS connection from Ground to CS1 (Note 1),
(2) Change ...
clock_EN.py has the line:
disp = TFT.ST7789(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=SPI_SPEED_HZ),
mode=SPI_MODE, rst=RST, dc=DC, led=LED)
The intention appears to be that the bus is defined by SPI_PORT and the chip select by SPI_DEVICE.
So set SPI_PORT and SPI_DEVICE and connect the device as follows