Showing posts with label rpi. Show all posts
Showing posts with label rpi. Show all posts

Monday, March 1, 2021

Host personal Jupyter notebook on RPI server

Install


sudo apt-get install python3-numpy python3-pandas python3-matplotlib
sudo apt-get install jupyter-notebook

Configure jupyter notebook


jupyter-notebook --generate-config

c.NotebookApp.ip = '192.168.1.6'
c.NotebookApp.port = 8890
c.NotebookApp.allow_remote_access = True
c.NotebookApp.open_browser = False

Setup Password


jupyter notebook password

Install any additional python packages

pip install panda-datareader

Start jupyter notebook


jupyter notebook

Let's try

  1. Open browser and enter url http://192.168.1.6:8890/ 
  2. Enter password
  3. Create a notebook directory inside home directory
  4. Create a notebook = finance
  5. Create cell and run, add run


References

  1. https://www.raspberrypi.org/forums/viewtopic.php?t=267204
  2. https://jupyter-notebook.readthedocs.io/en/stable/public_server.html
  3. https://riptutorial.com/pandas/example/6232/datareader-basic-example--yahoo-finance-

Sunday, June 28, 2020

Listen to HD Radio using RTL-SDR


Radio station in north america broadcasts HD radio signals. HD radio signal can be seen in below frequency spectrum of 102.7 MHz channel. The 2 rectangle shaped band on both side of analog radio signal are Lower and upped side band respectively of HD Radio signals. NRSC-5 is standard protocol to transmit HD radio signal. 


To receive and nrsc-5 radio, i have cross compiled (win64) nsrc program on pi using below commands
sudo apt install git build-essential cmake autoconf libtool libao-dev libfftw3-dev librtlsdr-dev
cd ~/dev/
git clone https://github.com/theori-io/nrsc5.git
cd nrsc5 
sudo apt install mingw-w64
support/win-cross-compile 64
Copy libnrsc5.dll and nrsc5.exe to windows and run

nrsc5.exe 102.7 0

if you get below error, stop any other which is using SDR device like SDRSharp and run it again.
usb_open error -3
Please fix the device permissions, e.g. by installing the udev rules file rtl-sdr.rules

References 
1. NRSC-5 https://www.nrscstandards.org/standards-and-guidelines/documents/standards/nrsc-5-d/nrsc-5-d.asp
2. nrsc github - https://github.com/theori-io/nrsc5