Playing with Raspberry Pi

Revision as of 14:30, 13 August 2017 by Benedikt Kämpgen (Talk | contribs)

Jump to: navigation, search

Helpful facts about Rspberry Pi.

Helpful facts about Rspberry Pi

What I used:

  • Grove Pi+
  • Several different sensors
  • Raspberry Pi 3

What I tried:

  • GrovePi + Pi 3
  • Using GrovePi sensors/actuators
  • Using microphone
  • Using Alexa
  • Using a bluetooth speaker
  • Media center with Volumio
  • Using Telegram

GrovePi + Pi 3

  • Remote desktop: sudo apt-get install xrdp
  • Used: Advanced: Using a PC and Win32 Disk Imager
  • sudo raspi-config
  • Check the pi password (not the one in the booklet but on a separate website) and change it!


Using GrovePi sensors/actuators

  • sudo python /home/pi/Dexter/GrovePi/Software/Python/

It's going to help us a lot by providing screenshots with what the console outputs.

cd Desktop/GrovePi/Script
sudo bash
sudo reboot

After you reboot, please enter the following commands in the terminal:

cd ~/Desktop/GrovePi/Firmware
sudo bash

Again we would like to see a screenshot for these last 2 commands too.


  • sudo python /home/pi/Desktop/GrovePi/Software/Python/
  • sudo python /home/pi/Desktop/GrovePi/Projects/LED_Fade/
  • sudo python /home/pi/Desktop/GrovePi/Projects/Button_And_Buzzer/ <= Button D3 Buzzer D2
  • sudo python /home/pi/Desktop/GrovePi/Projects/Ultrasonic_And_Relay/ <= Ultra D7, Relay D8
  • sudo python /home/pi/Desktop/GrovePi/Projects/Home_Weather_Display/

Home Weather Display

First did not work.

Had to copy library into folder.

Also, the display would not work, see

I had to change the code accordingly (frequency reduced).

Using microphone


Using Alexa

  • Amazon Developer Account


Bluetooth Speaker

Fazit: I did not succeed. I got pretty far, e.g., I was able to play music via bluetooth from the mobile phone. However, the on-board bluetooth chip of pi3 makes a lot of problems.

Some sources I used an how the helped:

To start and use bluetooth I had to:

  • Install bluez, pulseaudio, bluetooth, bluetooth module
  • In "sudo raspi-config" I had to disable "serial" [1]
  • Then, in "/boot/config.txt" I had to comment out:


Then I had to:

sudo systemctl status hciuart.service

sudo systemctl start hciuart.service

sudo systemctl status bluetooth

sudo systemctl start bluetooth

sudo hciconfig

sudo hciconfig hci0 up

rfkill list

rfkill unblock bluetooth

Also possible:

sudo bluetoothctl

power on

agent on 


scan on 

pair XX:XX...

trust XX.XX...

connect XX.XX...

pacmd list-sinks

pacmd set-default-sink bluez_sink.08_EB_ED_36_99_9D

pactl set-default-sink bluez_sink.08_EB_ED_36_99_9D

See [2].

What also possible helped: start-pulseaudio-x11

Increase volume via [3]


alsa store (or similar, to store the changes)

To change sound:

pactl list cards short <= did show the mobile phone

Jabra did not work (as neither did the Anker SoundCore 2):

See aplay -l should show bluetooth [4]

More info about mpd, have switched to pulseaudio:

Worked partly, to play some sound:

aplay /usr/share/sounds/alsa/Front_Center.wav

Did not help:

pacmd set-default-sink bluez_sink.08_EB_ED_36_99_9D pactl set-default-sink bluez_sink.08_EB_ED_36_99_9D

pulseaudio --start

Sound volume: alsamixer -Dhw [5]

All about PulseAudio:

pactl only exposes a subset of the available operations. For the full set use the pacmd(1). 

pactl - Control a running PulseAudio sound server 

pacmd - Reconfigure a PulseAudio sound server during runtime 

As said before, HSP profile is supported with PulseAudio 6 and newer."

A2DP, Advanced Audio Distribution Profile, for high audio quality, as normal speakers.
E.g. Music streaming

HSP, Headset Profile, the device exchanges in/out audio and some basic AT commands.
E.g. VoIP call

HFP, Hands-Free Profile, the device acts as a phone, so it exchanges audio in/out and telephony commands.
E.g. Hands-Free mode in car

Phone and Ipad do only work as a source, not a sink. pacmd list-sinks

sudo apt-get purge pulseaudio

Installed newer version of pulseaudio [6]

Finally, the reason for breaking with the on board bluetooth:

Onboard-Bluetooth-Dongle is not working properly (!!):


Media center with Volumio

sudo service apache2 stop

Mount USB drive:

sudo fdsik -l

nano /etc/fstab

/dev/sda1 /mnt/music_usb vfat defaults 0 0 <= FAT32

MPC works:

MPDroid works

Volumio would not work

Volumio with Alexa was then not possible either [7], [8].