Month: January 2018

A huddle of electronic modules

I decided to list all the modules on my pile of modules:

QuantityName of the component/moduleDoes it have support on NuttX RTOS?
3Relay moduleYes – normal GPIO
2Analog Microphone module with amplifierYes – normal ADC input
2ADXL345 Accelerometer module (GY-291)Yes – drivers/sensors/adxl345_base.c
2Zero cross detector moduleYes – drivers/sensors/zerocross.c
3GP2Y0AH01K0F distance sensorYes – normal ADC input
4LDR sensor moduleYes – normal ADC input
1MPU9250 moduleCan use: drivers/sensors/mpu60x0.c
34×4 telephone keypad moduleNo
2PS2 joystick moduleYes – drivers/input/ajoystick.c
1VEML6070 UV sensor moduleYes – drivers/sensors/veml6070.c
1W25Q32FVZPIG SPI NOR Flash moduleYes – drivers/mtd/w25.c
1VS1053 Audio MP3 moduleYes – drivers/audio/vs1053.c
8nRF24 2.4GHz moduleYes – drivers/wireless/nrf24l01.c
5MicroSD Card SPI moduleYes – drivers/mmcsd/mmcsd_spi.c
1WS2812 Breakout moduleYes – drivers/leds/ws2812.c
1OV7660 (CF7670C-V2) camera moduleNo
2HMC5883L 3-axis compass (GY-273)No
2HMC5983 3-axis compass module (GY-282)No
2Si1145 UV IR light sensor module (GY1145)No
4BMP280 pressure moduleYes – drivers/sensors/bmp280.c
3MAX485 RS485 module from LC TechnologyYes
1ML8511 Analog UV sensor module (GYML8511)Yes – normal ADC input
2ACS712 Current sensor moduleYes – normal ADC input
2Hall sensor analog module with amplifierYes – drivers/sensors/hall3ph.c
1Tilt module (mercury bulb)Yes – normal GPIO input
1Tilt module with 2 brass capsule/tubeYes – normal GPIO input
3 Rotary Encoder KY-040Yes – drivers/sensors/qencoder.c
210DOF MS5611 HMC5883L MPU6050 module (GY-86)Partial – drivers/sensors/mpu60x0.c
2LM75 temperature sensor module (CJMCU-75)Yes – drivers/sensors/lm75.c
2APDS-9960 Gesture sensor moduleYes – drivers/sensors/apds9960.c
1RDA5807M FM module (RRD-102)No
5SX1509 keypad controller moduleNo
3Laser pointer moduleYes – ordinary GPIO Output
3Reed-switch module with amplifierYes – ordinary GPIO Input
2MQ2 butane sensor module (FC-22)No
1Hall sensor module without amplifier (Keyes no PN)Yes – drivers/sensors/hall3ph.c
2MCP4725 DAC moduleNo
2ADCL335 Analog Accelerometer module (GY-61)Yes – ordinary GPIO Input
2Ra-01 LoRa module 433MHzYes – drivers/wireless/lpwan/sx127x
1TCS34725FN Color Light sensor moduleNo
1BH1750FVI light sensor moduleYes – drivers/sensors/bh1750fvi.c
1MAX30100 Pulse Oximeter and Heart-Rate SensorNo
2Buzzer module (RobotDyn)Yes – drivers/audio/tone.c
1LSM6DS3 3-axis accelometer gyroscopeYes – drivers/sensors/lsm6dsl.c
1MLX90614 Infrared Thermometer module (GY-906)Yes – drivers/sensors/mlx90614.c
4VL53L0X laser ranging sensor module (GYVL53L0X)Yes – drivers/sensors/vl53l1x.c
5TXB0108 level-shifter module (HW-0108)Don’t Apply
1HTU21 humidity sensor module (GY-21)No
2TEA5767 FM radio module (PL102BC-N)No
1DHT11 humidity and temperature sensor moduleYes – drivers/sensors/dhtxx.c
2Thyristor AC switch 5V logic AC 220V/5A moduleYes – Ordinary GPIO Output
1DS18B20 1-wire temperature probeYes – drivers/sensors/ds18b20.c
1USB Audio IN/OUT moduleNo
1AT24C02B EEPROM moduleYes – drivers/eeprom/i2c_xx24xx.c
5HX711 24-bit ADC Load Cell amplifier moduleNo
1BMP180 barometer sensor module (GY-68)Yes – drivers/sensors/bmp180.c
2QFN chip with this code: 2222 C3H 9L8GSNo ????
5mini joysticks 5-wayYes – drivers/input/djoystick.c
3slide potentiometerYes – ADC Input
33 – photodetectors similar used on mouseYes – Output Input
1voltage regulator module LM2596 DC-DCDon’t Apply
1RTC module DS1302Yes – drivers/timers/ds3231.c
1SIM800 modem moduleYes – pppd
3MAX6675 thermocoupler moduleYes – drivers/sensors/max6675.c
1SI4703 FM Radio ModuleNo
1CDM324 Radar ModuleNo
1ILI9486 LCD ModuleNo – only board sam_ili9488.c
3SN65HVD230 CAN TransceiverYes – w/ any CAN driver
4BNO055 Inertial Navigation ModuleNo
2PT100 sensors probeNo
2ST7735 LCD module with level shifterYes – drivers/lcd/st7735.c
2MAX31865 PT100/PT1000 RTD-to-Digital converterYes – drivers/sensors/max31855.c
4ST7789 LCD DisplayYes – drivers/lcd/st7789.c
4DC Motor control board BOSUNS K-MEN (HG7881CP)Yes – Ordinary GPIO Output
3GY-MAX30102 Pulse Oximeter and Heart-Rate Sensor moduleNo
1SPH0645 I2S MicrophoneNo
2GY-MAX30100 Pulse Oximeter and Heart-Rate Sensor moduleNo
4CJMCU-3001 (OPT3001) Light sensorNo
2INA219 current sensorYes – drivers/sensors/ina219.c
3SHT3x humidity and temperature sensorYes – drivers/sensors/sht3x.c
2CJMCU-1334 UDA1334A I2S stereo audio decoderNo
3Audio recorder/player board ISD1820Don’t Apply
4CJMCU-1X18 (ADS1118) ADC 16-bitNo
1CJMCU-90393 (MLX90393) magnetic sensorYes – drivers/sensors/mlx90393.c
4DAC module SPI 10-bit resolution DAC-5615MINI V3 (TLC5615)No
1Microphone module with MAX9814 ampliflierYes – Ordinary ADC Input
3CJMCU-9911 module AK09911C Geomagnetic Hall Sensor 3-axisYes – drivers/sensors/ak09912.c
40-3V Analog Voltage Gauge (Voltmeter)Yes – Ordinary DAC Output
2Si5351 8KHz – 160MHz frequency generator (CJMCU-5351)No
5ADS7843E resistive touchscreen interfaceYes – drivers/input/ads7843e.c
1Si4463 868MHz moduleNo
1Si4432 433MHz moduleNo
1LAN8720 Ethernet moduleYes
3MS5611 barometer module (GY-63)Yes – drivers/sensors/ms5611.c
3Trackpad of the BlackBerry Curve 8520 8530No
3MCP23017 I2C I/O Expander moduleYes – drivers/ioexpander/mcp23x17.c
3MCP23S17 SPI I/O Expander moduleNo
4ADNS-3080 navigation sensorNo
23.5″ SPI TFT Module ILI9488 320×480 w/ Resistive Touchscreen (MSP3520)No
1e-ink paper 200×200 il3829No
5Magnetic Encoder AS5600No
3SX1262 LoRa moduleYes – Lup Lee github
5TCA9548A I2C MultiplexerYes – drivers/i2c/tca9548a.c
2CJMCU-MS5540C Pressure moduleNo
2MAX31855 Thermocouple-to-Digital ConverterYes – drivers/sensors/max31855.c
5MMA8452 Accelerometer (GY-45)No
1OLED Display SSD1351 (128×128)Yes – drivers/lcd/ssd1351.c
3Ethernet module W5500Yes – drivers/net/w5500.c
2MPR121 keypadNo
1APA102 RGB LED 16×16 MatrixYes – drivers/leds/apa102.c and drivers/lcd/apa102.c
3MAX98357 I2S audio codecYes – default I2S (need double check)
3INMP441No
3CS4344 I2S audio codec Yes – drivers/audio/cs4344.c
1SSD1309 128×64 transparent OLED displayYes – drivers/lcd/ssd1306_base.c
2CM108 USB Audio codecNo
1HINK-E075A01 7.5″ E-Ink displayNo
1DESPI-C02 E-Ink epaper 250×122 1.5″No
1PZ-WM8978-MP3 (WM8978 audio codec)No
2CJMCU-1334No

How to build NuttX on Windows 10

First let me to make things clear: I stopped using Windows operating system about 18 years ago, when in 2000 Chernobyl virus erased the BIOS Flash and the Hard Disk of my computer that was running Windows 98 at that time.

But because many people are asking me to show how to compile NuttX on Windows, I will show how you can do it using Windows 10 (sorry Windows 7, Windows Vista, Windows XP, Windows 2000, Windows Millennium, Windows 98, Windows 95, Windows 3.1, … and DOS users, but it only works on Windows 10).

You need to enable to “Developer Mode” of Windows: click on Window icon at bottom left corner of your screen and then click on “Windows Settings” (gear icon).

Settings:

In the “Windows Settings” click on “Update & Security”.

Update & Security:

Inside it click in “For Developers”.

For developers:

And enable the option “Developer Mode”.

Developer mode:

After that you need to enable the Windows Subsystem for Linux. Open the “Control Panel”.

Control Panel:

Enter inside “Programs”.

Programs:

Click on “Turn Windows features on or off”.

Turn Windows features on or off:

Then it will open the “Windows Features” window, scroll down until you find “Windows Subsystem for Linux”.

Enable the Windows Subsystem for Linux:

Then click to enable it:

At this moment the Windows will ask to restart, click in the Restart button.

When the system restarted you can run the “bash” command:

It will show the message explaining the a Linux distribution is not installed:

Open the browser and go to: https://aka.ms/wslstore

The the Microsoft Store will open automatically:

Click in the Ubuntu distribution, and the click on Get button:

When it finishes the download click on Launch button:

It will run the installation script, when it finishes you can close it and run the Ubuntu command:

Then the Linux terminal will open:

Now you can follow these steps to compile NuttX:

$ sudo apt-get update

$ sudo apt-get install automake bison build-essential flex gcc-arm-none-eabi gperf git libncurses5-dev libtool libusb-dev libusb-1.0.0-dev pkg-config

Create the nuttx workspace:

mkdir ~/nuttxspace

cd ~/nuttxspace

The Windows Subsystem for Linux doesn’t support USB devices (except USB Pendrive), then we don’t need to install OpenOCD. We will use the JLink too on Windows itself.

Clone the NuttX repositories:

$ cd ~/nuttxspace

$ git clone https://github.com/apache/incubator-nuttx nuttx

$ git clone https://github.com/apache/incubator-nuttx-apps apps

$ git clone https://bitbucket.org/nuttx/tools

Configure, compile and install the Kconfig-Frontends (needed by NuttX’s menuconfig)

$ cd ~/nuttxspace

$ cd tools/kconfig-frontends/

$ ./configure

$ make

$ sudo make install

$ sudo ldconfig

Now we can compile NuttX for XMC4-Relax board!

Run the configure script:

$ cd ~/nuttxspace

$ cd nuttx

$ ./tools/configure.sh xmc4500-relax/nsh

Run menuconfig and change the build to Linux and UART3 as serial console:

$ make menuconfig

Build Setup  --->
    Build Host Platform (Linux)

System Type  --->
    XMC4xxx Peripheral Support  --->
        [ ] USIC0
        [*] USIC1  (press SPACE to select)
        [ ] USIC2

    XMC4xxx USIC Configuration  --->
        USIC1 Channel 0 Configuration (Not used)  --->
        USIC1 Channel 1 Configuration (UART3)  --->

Device Drivers  --->
    [*] Serial Driver Support  --->
        Serial console (UART3)  --->

Time to compile it:

$ make

If everything compiled correctly you get a nuttx.bin:

$ ls -l nuttx.bin
-rwxrwxr-x 1 alan alan 79804 Jan  8 12:25 nuttx.bin

Just copy this nuttx.bin binary to Windows side:

$ cp nuttx.bin /mnt/c/ProgramData/

You will need to configure Windows Explorer to show Hidden files, this way you could see the nuttx.bin at C:\ProgramData

Running NuttX on Infineon XMC4500-Relax

This is a step-by-step tutorial explaining how to compile and install NuttX on Infineon XMC4500-Relax board.

These steps where tested on Ubuntu 16.04 LTS (Long Term Support).

Open the Linux terminal and install the dependence packages using this command:

$ sudo apt-get install automake bison build-essential flex gcc-arm-none-eabi gperf git libncurses5-dev libtool libusb-dev libusb-1.0.0-dev pkg-config

Create the nuttx workspace:

mkdir ~/nuttxspace

cd ~/nuttxspace

Clone and compile the OpenOCD (it is used to flash the firmware in the board).

$ git clone http://repo.or.cz/r/openocd.git

$ cd ~/nuttxspace/openocd

$ ./bootstrap

$ ./configure --enable-internal-jimtcl --enable-maintainer-mode --disable-werror --disable-shared --enable-stlink --enable-jlink --enable-rlink --enable-vslink --enable-ti-icdi --enable-remote-bitbang --enable-usb-blaster --enable-presto --enable-osbdm

$ make

$ sudo make install

Copy the OpenOCD udev rules and update it:

$ cd contrib

$ sudo cp 60-openocd.rules /etc/udev/rules.d/

$ sudo udevadm trigger

Clone the NuttX repositories:

$ cd ~/nuttxspace

$ git clone https://github.com/apache/incubator-nuttx nuttx

$ git clone https://github.com/apache/incubator-nuttx-apps

$ git clone https://bitbucket.org/nuttx/tools

Configure, compile and install the Kconfig-Frontends (needed by NuttX’s menuconfig)

$ cd ~/nuttxspace

$ cd tools/kconfig-frontends/

$ ./configure

$ make

$ sudo make install

$ sudo ldconfig

Now we can compile NuttX for XMC4-Relax board!

Run the configure script:

$ cd ~/nuttxspace

$ cd nuttx

$ ./tools/configure.sh xmc4500-relax/nsh

Run menuconfig and change the build to Linux and UART3 as serial console:

$ make menuconfig

Build Setup  --->
    Build Host Platform (Linux)

System Type  --->
    XMC4xxx Peripheral Support  --->
        [ ] USIC0
        [*] USIC1  (press SPACE to select)
        [ ] USIC2

    XMC4xxx USIC Configuration  --->
        USIC1 Channel 0 Configuration (Not used)  --->
        USIC1 Channel 1 Configuration (UART3)  --->

Device Drivers  --->
    [*] Serial Driver Support  --->
        Serial console (UART3)  --->

Time to compile it:

$ make

If everything compiled correctly you get a nuttx.bin:

$ ls -l nuttx.bin
-rwxrwxr-x 1 alan alan 79804 Jan  8 12:25 nuttx.bin

Plug the USB cable on you computer and on XMC4500-Relax board and use OpenOCD to flash it:

$ sudo openocd -f board/xmc4500-relax.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x0c000000"

You should see these messages:

$ sudo openocd -f board/xmc4500-relax.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x0c000000"
Open On-Chip Debugger 0.10.0+dev-00172-g7719e96 (2017-11-12-09:13)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 4000 kHz
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
Info : No device selected, using first device.
Info : J-Link Lite-XMC4000 Rev.1 compiled Apr  2 2015 18:25:20
Info : Hardware version: 1.00
Info : VTarget = 3.300 V
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : xmc4500.cpu: hardware has 6 breakpoints, 4 watchpoints
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000200 msp: 0x20001e84
auto erase enabled
Info : Clearing flash status
Info : Clearing flash status
wrote 81920 bytes from file nuttx.bin in 19.998228s (4.000 KiB/s)

Configure your Linux machine to let your user to have access to serial port:

$ sudo usermod -a -G dialout alan

You just replace ‘alan’ with your username.

You need a USB/Serial adapter that works to 3.3V, like FDTI dongle or Silabs CP2102.

Connect the USB/Serial RXD to XMC4500-Relax board P0.1 (Header pin X1 pin 34), connect TXD to P0.0 (Header pin X1 pin 36) and connect the GND to board GND (Header pin X1 pin 1, 2, 3 or 4).

Configure minicom to use your USB/Serial adapter (i.e. at /dev/ttyUSB0) to 115200 8n1:

$ sudo minicom -s

Serial port setup
    A -    Serial Device      : /dev/ttyUSB0
    E -    Bps/Par/Bits       : 115200 8N1
    F - Hardware Flow Control : No
    G - Software Flow Control : No

Save setup as dfl

Exit

Press the XMC4500 Reset button and you should see:

NuttShell (NSH)                                                                 
nsh>

Type ‘help’ or ‘?’ to the the listing of enabled commands:

nsh> help
help usage:  help [-v] []

  [           dirname     help        mh          set         unset       
  ?           dd          hexdump     mount       sh          usleep      
  basename    df          kill        mv          sleep       xd          
  break       echo        ls          mw          test        
  cat         exec        mb          ps          time        
  cd          exit        mkdir       pwd         true        
  cp          false       mkfatfs     rm          uname       
  cmp         free        mkrd        rmdir       umount      

Builtin Apps:
  i2c
  ramtest
nsh> 

Running NuttX on ESP32 board

NuttX supports the Expressif ESP32 inclusive with SMP (Symmetric MultiProcessing) support, then I decided to post here the steps I followed to get it working:

Install esptool:

$ sudo pip install esptool

Install to toolchain:

You can download the pre-build toolchain:

https://esp-idf.readthedocs.io/en/latest/get-started/index.html

Or: you can compile it from source code:

$ git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git
$ cd crosstool-NG
$ ./bootstrap && ./configure --prefix=$PWD && make install
$ ./ct-ng xtensa-esp32-elf
$ unset LD_LIBRARY_PATH
$ ./ct-ng build
$ chmod -R u+w builds/xtensa-esp32-elf
$ sudo cp -a builds/xtensa-esp32-elf/* /usr/local/

Now you can compile the NuttX:

$ mkdir ~/nuttxspace
$ cd ~/nuttxspace
$ git clone https://bitbucket.org/nuttx/nuttx
$ git clone https://bitbucket.org/nuttx/apps
$ cd nuttx
$ make distclean
$ ./tools/configure.sh esp32-core/nsh
$ make

The nuttx.bin generated is too big, you need to generate it from elf file (nuttx) :

$ esptool.py --chip esp32 elf2image --flash_mode dio --flash_size 4MB -o ./nuttx.bin nuttx

You will need the bootloader.bin and the partitions, you can get it from hello word example. You need to clone and update the submodules of esp-idf (read the Get Started from above link), then:

$ cp -a esp-idf/examples/get-started/hello_world .
$ cd hello_world
$ make
$ cp build/bootloader/bootloader.bin ~/nuttxspace/nuttx/
$ cp build/partitions_singleapp.bin ~/nuttxspace/nuttx/partitions.bin

The files nuttx.bin, bootloader.bin and partitions.bin need to be flashed in the board. To do that first put the board in ROM Boot mode:

Press and hold the BOOT button of ESP32 board (IO0 pin will be put in low level) and press and release the RESET button. Now you can release the BOOT button.

This is the command to flash:

$ sudo esptool.py --chip esp32-c3 --port /dev/ttyUSB0 --baud 921600 write_flash 0x0 ../esp-bins/bootloader-esp32c3.bin 0x8000 ../esp-bins/partition-table-esp32c3.bin 0x10000 nuttx.bin
esptool.py v3.0
Connecting....
Chip is ESP32D0WDQ6 (revision 0)
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0220
Compressed 19392 bytes to 11445...
Wrote 19392 bytes (11445 compressed) at 0x00001000 in 0.2 seconds (effective 901.6 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 82...
Wrote 3072 bytes (82 compressed) at 0x00008000 in 0.0 seconds (effective 10507.6 kbit/s)...
Hash of data verified.
Compressed 185024 bytes to 45527...
Wrote 185024 bytes (45527 compressed) at 0x00010000 in 2.1 seconds (effective 710.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting...
$

Finally open minicom and just reset the board, you should get it:

$ minicom


Welcome to minicom 2.7

OPTIONS: I18n 
Compiled on Feb  7 2016, 13:37:27.
Port /dev/ttyUSB0, 15:40:48

Press CTRL-A Z for help on special keys

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5568
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:13716
entry 0x40078fb4
I (31) boot: ESP-IDF v3.1-dev-162-geb659e4 2nd stage bootloader
I (31) boot: compile time 15:35:11
I (42) boot: Enabling RNG early entropy source...
I (42) boot: SPI Speed      : 40MHz
I (42) boot: SPI Mode       : DIO
I (45) boot: SPI Flash Size : 4MB
I (49) boot: Partition Table:
I (52) boot: ## Label            Usage          Type ST Offset   Length
I (60) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (67) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (75) boot:  2 factory          factory app      00 00 00010000 00100000
I (82) boot: End of partition table
I (86) esp_image: segment 0: paddr=0x00010020 vaddr=0x3ffb0df0 size=0x00054 (    84) load
I (95) esp_image: segment 1: paddr=0x0001007c vaddr=0x40080000 size=0x00400 (  1024) load
I (104) esp_image: segment 2: paddr=0x00010484 vaddr=0x40080400 size=0x00300 (   768) load
I (113) esp_image: segment 3: paddr=0x0001078c vaddr=0x400c0000 size=0x00000 (     0) load
I (122) esp_image: segment 4: paddr=0x00010794 vaddr=0x00000000 size=0x0f874 ( 63604) 
I (153) esp_image: segment 5: paddr=0x00020010 vaddr=0x3f400010 size=0x018e4 (  6372) map
I (155) esp_image: segment 6: paddr=0x000218fc vaddr=0x00000000 size=0x0e714 ( 59156) 
I (179) esp_image: segment 7: paddr=0x00030018 vaddr=0x400d0018 size=0x0d278 ( 53880) map
I (199) boot: Loaded app from partition at offset 0x10000
I (199) boot: Disabling RNG early entropy source...

NuttShell (NSH)
nsh> 
nsh> ?
help usage:  help [-v] []

  [           cmp         false       mkdir       rm          true        
  ?           dirname     free        mh          rmdir       uname       
  basename    dd          help        mount       set         umount      
  break       df          hexdump     mv          sh          unset       
  cat         echo        kill        mw          sleep       usleep      
  cd          exec        ls          ps          test        xd          
  cp          exit        mb          pwd         time        

Builtin Apps:
nsh>

P.S.: If your board is rebooting, then disable the RTC watchdog in the bootloader.

How to get IRC notification on pidgin

I use pidgin as my centralized message application (Google Hangout, Jabber, ICQ, …) and also to get messages from freenode IRC.

But there is an issue with #IRC support on pidgin: I don’t know when someone posted a new message in the channel (#nuttx channel of course).

Then search about it a found a solution here:

https://ubuntuforums.org/showthread.php?t=1415173

There is a program called pidgin-irc-notifications that helps:

https://bitbucket.org/boralyl/pidgin-irc-notifications/overview

Note: I need to install pynotify first:

$ sudo pip install py-notify