The following steps yields a rpi that can interface with the firmware on the Nucleo F401RE via SPI. The rpi and the STM32F401 must be connected as explained here.
- Download and install raspbian
- Update the system
- Run raspi-config and enable SPI
- Resize SPI buffer (by default it’s too small). Append the following to the line in /boot/cmdline.txt:
- Install wiringPi
Command line interface
To install a command line interface the following further steps are required:
- Download the Otterly-rpiCLI
- Unzip, enter directory, and type ‘make’
The CLI takes the following options:
- output file
Graphical user interface
To install a graphical user interface the following further steps are required:
- Install libgtk-3-dev
- Install gnuplot
- Download the Otterly Raman GUI
- Unzip, enter directory, and type ‘make’.
The resulting executable should look something like this. Not all features have been implemented yet, but you can set the integration time and collect data (record).
The data is saved in the “default_datafile.dat” and plotted with gnuplot in the file “default4_plot.svg”. Both files are overwritten each time Record is pressed.
For a more feature-rich version of the GUI have a look at the work of Jens-Ulrich Fröhlich’s blog Leaves of science. He uses Octave for data-manipulation.
Connecting to the rpi
In case you don’t have a dedicated screen, keyboard and mouse for your rpi, an easy way to connect to the rpi is to set it up as an access-point:
- Follow the steps at: http://elinux.org/RPI-Wireless-Hotspot
- Use SSH with X-forwarding to connect to the rpi:
ssh -X firstname.lastname@example.org