Author: mswiniuch

[Guide] Internet radio + LCD 2x16 + TactSwitch (Ready to use)

[Copy link]

0

threads

1

posts

10

credits

Novice

Rank: 1

credits
10
Published in 2018-3-26 18:06:11 | Show all floors
External DAC is not possible with Orange Pi Zero , otherwise it works well.

0

threads

19

posts

1456

credits

Gold member

Rank: 6Rank: 6

credits
1456
Published in 2018-5-22 02:58:37 | Show all floors
Edited by kris777 at 2020-6-13 21:01

Orange Pi zero DAC https://sites.google.com/site/or ... rangepi-one/dac-i2s
I checked on my OrangePi Lite ... it works great !  (Allwinner H3 platform)
Configuring the system
go to boot folder
cd /boot

turn script.bin into fex file and edit
sudo bin2fex script.bin script.fex
sudo nano script.fex

Changes:
[twi1]
twi_used = 1
to
twi_used = 0

[pcm0]
daudio_used = 0
to
daudio_used = 1

Then save the file and
sudo fex2bin script.fex script.bin

And reboot.
.....................................
configuration and connection of GPIO bus pins ....diagram at the bottom of the post :-)


...................................................cat /proc/asound/cards
0 [audiocodec ]: audiocodec - audiocodec
audiocodec
1 [snddaudio ]: snddaudio - snddaudio
snddaudio
2 [sndhdmi ]: sndhdmi - sndhdmi
sndhdmi

....................................................................
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: snddaudio [snddaudio], device 0: SUNXI-TDM0 snddaudio-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

my DAC  : PCM5102 DAC Decoder I2S
.................................................
mpd configuration:.................................
audio_output {
        type                "alsa"
        name                "My ALSA Device"
        device                "hw:1,0"        # optional
    format      "44100:16:2"
        mixer_type      "software"      # optional
        mixer_device        "default"        # optional
#        mixer_control        "PCM"                # optional
#        mixer_index        "0"                # optional
}

............................
forcing the use of 32 bits
................................
audio_output {

        type            "alsa"
        name            "My ALSA Device"
        device          "hw:1,0"
       format          "192000:32:2"
}
..........................


und USB / DAC card works with the Armbian system :
PCM2706+ES9023 USB Portable DAC HIFI Fever External Audio Card Decoder For Amplifier AMP Mobile OTGAliexpress USB DAC

Orange Pi One & Lite as music streamers

This thread contains more resources

You need to Log in to download or view,No account?    Register

x

0

threads

19

posts

1456

credits

Gold member

Rank: 6Rank: 6

credits
1456
Published in 2020-10-19 04:23:41 | Show all floors
This post was finally edited by kris777 at 2022-6-2 17:30

if someone wants to use google speech synthesizer to read the current date and time ....Polish language version
  1. #!/bin/bash
  2. google_speech -e vol 0.10 -l pl "Jest $(date +"%A %d %B") godzina $(date +%R)"
Copy code

in case of any errors, you can try the entry:
  1. rm -R ~/.cache/google_speech
Copy code

0

threads

19

posts

1456

credits

Gold member

Rank: 6Rank: 6

credits
1456
Published in 2021-2-18 02:05:53 | Show all floors
or add gtts-cli
  1. pip install gTTS
Copy code
  1. gtts-cli --lang pl "Jest $(date +"%A %d %B") godzina $(date +%R)" | play -v 0.1 -t mp3 -
Copy code

1

threads

24

posts

105

credits

Registered member

Rank: 2

credits
105
Published in 2021-2-27 06:06:33 | Show all floors
Hi Kris777
I cant get your code to work on my Orange Pi Zero running Armbian

Below is the error:
  1. gtts-cli --lang pl "Jest $(date +"%A %d %B") godzina $(date +%R)" | play -v 0.1 -t mp3 -
  2. play WARN alsa: can't encode 0-bit Unknown or not applicable
  3. play FAIL formats: no handler for given file type `mp3'
Copy code
If I change to:

  1. gtts-cli --lang pl "Jest $(date +"%A %d %B") godzina $(date +%R)"  > test.mp3
  2. mpg123 test.mp3
Copy code
This works and I hear the date in Polish.
It seems my 'play' does not like mp3 format.
Is there a codec I need to install or other files?
Thanks in advance






0

threads

19

posts

1456

credits

Gold member

Rank: 6Rank: 6

credits
1456
Published in 2021-3-10 05:59:19 | Show all floors

1

threads

24

posts

105

credits

Registered member

Rank: 2

credits
105
Published in 2021-3-13 19:56:28 | Show all floors
kris777 replied at 2021-3-10 05:59
here is some topic about this bug
sox default deviceSox errors playing mp3 files even with libsox-fm ...

Thank you Kris777 its working.
Turns out I was missing sox and sox-fmt-all

After installing it works perfect.


0

threads

1

posts

26

credits

Novice

Rank: 1

credits
26
Published in 2021-11-15 21:55:29 | Show all floors
Hi folks, I'm trying to recreate this ingenious radio with an Orange Pi Zero. I don't really understand the GPIOs assigment yet. In the picture I tried to assign the GPIOs that I want to use. Is that right? Has anyone tried the https://github.com/xpertsavenue/WiringOP-Zero library?

This thread contains more resources

You need to Log in to download or view,No account?    Register

x

0

threads

3

posts

32

credits

Novice

Rank: 1

credits
32
Published in 2022-5-2 21:26:09 | Show all floors
Manually pressing the operating section of a tactile switch allows electricity to flow in the electrical circuit and the use of the switch is used to provide an input signal to activate a device or devices.
microphone systems

0

threads

452

posts

1124

credits

Gold member

Rank: 6Rank: 6

credits
1124
Published in 2023-12-13 04:40:13 | Show all floors
Quality backlinks from authoritative sources are like gold nuggets in the treasure chest of 구글 seo.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list