@Lazar-Demin hello! what's up with halloween contests? You promised to publish the results on November 9))
Posts made by Andrew Naumenko
-
RE: what happened to the status page ?
-
Halloween contest
Hello!
Today I wanted to see the results of your halloween contest (https://onion.io/halloween-contest-2018/). I have not found any results. Does anyone know about the results of the competition?? I sent the project to the competition and I really hope to win -
RE: Trying to get the I2S audio working
@Pavils-Jurjans I tried to install b199 and received the same errors as yours. I decided to just roll back to the older version. Apparently when the developers added hardware PWM (b195), they decided to turn off the I2S.
-
RE: Trying to get the I2S audio working
Version b193 have a I2S. I use this version in my last project
-
Bloody Lola on Omega 2
We will need: two LEDs, a speaker, a 5 and 12 volt power supply, a motion sensor (12 volts only), a 3.3 volt power converter, a simple amplifier (any class D with 3-12 volts) and Omega 2. You will also need an optional flash drive or sd card to expand the disk space.
We open the doll. We put the LEDs in the eyes and the speaker in the area of the mouth with hot-melt. The speaker soldered to the amplifier, the LEDs are connected to field-effect transistors ... In general, we collect the following scheme.Next, go to setting up the software. If you want to use i2s sound, we put b193 firmware on omega, because i2s doesn’t work further. If not, you can insert a sound card into the USB and then adjust the sound on this guide. If you do like me, then I wrote about working with i2s sound here. We connect to wifi and increase the disk space of omega 2. Everything is in detail in the manual here.
After that we executeopkg update
opkg install alsa-utils mpg123 python pyOnionGpio nanoNow, our omega is almost able to speak and it remains only to write a Python script for this business. The logic is simple. A motion sensor opens a circuit between two GPIOs. On one we give a logical unit when turned on, the value of the second is read. When there is 0, then we begin to reproduce the terrible sounds and flashing LEDs. The rest of the time we are silent. Realization of all this looks like this.
import onionGpio
import subprocess
import randomgpioOut = onionGpio.OnionGpio (15)
gpioOut.setOutputDirection (0)
gpioOut.setValue (1)gpioObj = onionGpio.OnionGpio (17)
status = gpioObj.setInputDirection ()while true:
value = gpioObj.getValue ()if int (value) == 0:
cmd = "fast-gpio pwm 18" + str (random.randint (5.15)) + "50"
subprocess.call (cmd, stdout = subprocess.PIPE, shell = True)
cmd = "fast-gpio pwm 19" + str (random.randint (2,10)) + "50"
subprocess.call (cmd, stdout = subprocess.PIPE, shell = True)
cmd = "mpg123 -f 256 -C / mnt / sda1 /" + str (random.randint (1.6)) + ".mp3"
subprocess.call (cmd, stdout = subprocess.PIPE, shell = True)else:
subprocess.call ("fast-gpio set 18 0", stdout = subprocess.PIPE, shell = True)
subprocess.call ("fast-gpio set 19 0", stdout = subprocess.PIPE, shell = True)Files of terrible sounds are added to / mnt / sda1 under the names 1.mp3, 2.mp3 ... I have them 6. and one of them is randomly turned on. The PWM frequency of the Omega 2 outputs is also randomly turned on separately under the left and right eyes. Then we write two lines to rc.local by executing the command
nano /etc/rc.local
omega2-ctrl gpiomux set i2s i2s
python /mnt/sda1/start.pyAs I think you guessed the script I quoted above, you need to save it in the / mnt / sda1 directory as start.py
Next, the last step. Most creative. Makeup. I just asked my wife (cheater) and she did great. Thank you very much!
You can see how it all works with sound in the video below. In the dark, it's looks pretty creepy, to be honest. Hope you enjoyed it. Thanks for attention! -
RE: [Resolved] Attaching PCM5102 to Omega2 (I2S)
In this theme
Judging by this picture, the data format is 16 bits i2s -
RE: [Resolved] Attaching PCM5102 to Omega2 (I2S)
I fiddled with the parameters of TDA1543 and got a normal sound. But it is so only when I set the playback volume in mpg123 to 2 percent. More and I get distortions, I will give another 2 oscillograms first - "mpg123 -f 128" second "mpg123 -f 256". Initially this is a saw with a single amplitude generated with the aid of audacity.
However, that sounds!
I also noticed an error, the line CLK does not turn off when the sound stops. -
RE: [Resolved] Attaching PCM5102 to Omega2 (I2S)
Hi guys!
I'm all trying to figure out what's wrong with TDA1543. I got a few graphs to explain my problem. I uploaded a test mp3 file and run him mpg123 -f 256 -C -v sin1000.mp3 (-f 256 is amplitude). File mp3 - sine wave, frequency 1 kHz.The amplitude is varied from 128 to 1024 (128 is displayed in mpg123 as 0 and it is on level with the noise level of the chip itself)
Initially, I sinned on the error data types (U16 or S16) but now I think that the problem is in the data reading frequencies. Maybe someone will have an idea what's the problem?Now I'm trying to compile a kernel for omega with other codecs (how shown in this theme), but it's not working yet. If anyone has a ready-made kernel with other codecs, which I could immediately flash into the omega for tests, discard the download link. Thks!
-
RE: [Resolved] Attaching PCM5102 to Omega2 (I2S)
@luz tda1543 does not require management (i2c or spi). It only needs a standard I2S interface with 16 bits with a 1 bit offset. The max98357 chip is too versatile and can understand many formats, but as I said earlier, the problem lies in the unsigned format of the output data. TDA1543 understands the range -32,768 to 32,767, and the omega2 yields 0 to 65,535.
Can you explain in more detail, how I can rebuild the system for making any changes?
Thks! -
RE: [Resolved] Attaching PCM5102 to Omega2 (I2S)
I rechecked all the parameters of the i2s signal from omega2 and found the problem. i2s signal from omega 2 leaves really 16 bits per channel, but by default the data type is unsigned (u16). In the standard, I2S signal must be signed, and because of this, I have distortions with overload for TDA1543. At tests with MAX98357 these problems did not arise (probably) because it understands 16 24 and 32 bits, because of what the bit of the sign is shifted. When I try to reproduce the sign type of the signal (for example "mpg123 -e s16 test.mp3"), omega 2 is restarting.
-
RE: I2S to 16 bit
I rechecked all the parameters of the i2s signal from omega2 and found the problem. i2s signal from omega 2 leaves really 16 bits per channel, but by default the data type is unsigned (u16). In the standard, I2S signal must be signed, and because of this, I have distortions with overload for TDA1543. At tests with MAX98357 these problems did not arise (probably) because it understands 16 24 and 32 bits, because of what the bit of the sign is shifted. When I try to reproduce the sign type of the signal (for example "mpg123 -e s16 test.mp3"), omega 2 is restarting.
-
I2S to 16 bit
Hi to all! I try to connect my Omega2 to TDA1543. But standart I2S audio card output have 24 bit. I need to switch I2S output to 16 bit format (MT7688 can do it, I suppose). Somebody did this?
-
Error 12 out of memory pip install paho_mqtt
Hi. I tried install paho_mqtt on python 2.7, but see this (--verbose):
Downloading from URL https://pypi.python.org/packages/e0/fb/13680584b3781faf9daeb5c4728e171d89357cb00cdf1cad6b4e30c8cc8/paho-mqtt-1.2.1.tar.gz#md5=b85a8315b11c51d59859ac88d901ec7 (from https://pypi.python.org/simple/paho-mqtt/)
Running setup.py (path:/tmp/pip-build-oJel7Q/paho-mqtt/setup.py) egg_info for pckage paho-mqtt
Running command python setup.py egg_info
Error [Errno 12] Out of memory while executing command python setup.py egg_ino
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 324, in rn
requirement_set.prepare_files(finder)
File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepar_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 634, in _prepae_file
abstract_dist.prep_for_dist()
File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 129, in prep_fr_dist
self.req_to_install.run_egg_info()
File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 439, in ru_egg_info
command_desc='python setup.py egg_info')
File "/usr/lib/python2.7/site-packages/pip/utils/init.py", line 667, in cal_subprocess
cwd=cwd, env=env)
File "/usr/lib/python2.7/subprocess.py", line 390, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 916, in _execute_child
self.pid = os.fork()
OSError: [Errno 12] Out of memorywhat's my mistake?