Go to advanced search

by miaomiao
Tue Sep 12, 2017 9:51 am
Forum: Troubleshooting
Topic: Omxplayer fail to play sound file when Raspberry Pi auto run
Replies: 1
Views: 363

Omxplayer fail to play sound file when Raspberry Pi auto run

First time Raspberry Pi user. We are using Geany on RP2 and play audio sound is one of our function. " Omxplayer " is used. This is the code we use in geany to play sound file status=system("omxplayer -g -o local sound.mp3") When I run it in the RP terminal it can work properly,but only problem is w...
by miaomiao
Mon Aug 07, 2017 5:51 am
Forum: Beginners
Topic: Cant max or min window, missing button
Replies: 6
Views: 1230

Re: Cant max or min window, missing button

Anyone have solution? Really need help. Thank you.
by miaomiao
Wed Aug 02, 2017 7:09 am
Forum: Beginners
Topic: Cant max or min window, missing button
Replies: 6
Views: 1230

Re: Cant max or min window, missing button

PeterO wrote:
Wed Aug 02, 2017 6:57 am
Looks like there is no window manager running.
PeterO
Thank you! How should I solve the problem? I tried to google,but haven't find solution yet.
by miaomiao
Wed Aug 02, 2017 1:09 am
Forum: Beginners
Topic: Cant max or min window, missing button
Replies: 6
Views: 1230

Re: Cant max or min window, missing button

I am *NOT* an expert, but I shall try to help. Oh - Sorry, but what you say is confusing. A screen grab would help - well maybe not. *IF* I am understanding you correctly, here are some point to try: I am hoping you are using HDMI monitor. 1 - Press (and hold) the ALT key. 2 - Click (and hold) anyw...
by miaomiao
Tue Aug 01, 2017 4:52 am
Forum: Beginners
Topic: Cant max or min window, missing button
Replies: 6
Views: 1230

Cant max or min window, missing button

I am using Raspberry Pi 2. The windows I opened , maximize/minimize/close buttons all missing. And windows all cant move to anywhere, always stick at left top side. I also cant open more than one window. Any one can help? REALLY NEED HELP. Thank you very much.
by miaomiao
Thu Jul 27, 2017 2:12 am
Forum: Troubleshooting
Topic: The common mouse arrow becomes a cross "X"
Replies: 1
Views: 411

Re: The common mouse arrow becomes a cross "X"

I cant do multitask on Raspberry Pi. Any one can help?Thanks a lot.
by miaomiao
Wed Jul 26, 2017 10:37 am
Forum: General discussion
Topic: How to download code to Raspberry Pi to execute at start
Replies: 7
Views: 1734

Re: How to download code to Raspberry Pi to execute at start

how do you start it when you are running normally ? i.e. what command do you type from where ? what do you click what do you need to do to get it to run now? I ran it normally by pi@raspberrypi: sudo ./get_distance Now I am trying to auto run it when power on by pi@raspberrypi: sudo nano /etc/rc.lo...
by miaomiao
Wed Jul 26, 2017 10:23 am
Forum: General discussion
Topic: How to download code to Raspberry Pi to execute at start
Replies: 7
Views: 1734

Re: How to download code to Raspberry Pi to execute at start

If you wish to run automatically CLI commands or scripts (bash, python, etc) at startup, crontab should work fine. I do not understand your comment related to compile and make. When you compile a program, you generate an executable program which is ready to run. You will not need to recompile it ag...
by miaomiao
Tue Jul 25, 2017 2:41 am
Forum: General discussion
Topic: How to download code to Raspberry Pi to execute at start
Replies: 7
Views: 1734

How to download code to Raspberry Pi to execute at start

Hi, I am using Raspberry Pi2. And I encountered problem to put code into Raspberry pi,it could work properly in the terminal with LCD on. But if I want Raspberry Pi execute automatically at startup without I click " compile" "make". I tried this five methods still could not work. https://www.dexteri...
by miaomiao
Tue Jul 25, 2017 2:18 am
Forum: Troubleshooting
Topic: The common mouse arrow becomes a cross "X"
Replies: 1
Views: 411

The common mouse arrow becomes a cross "X"

Hi, I am using Raspberry Pi 2. It could work properly, but it suddenly changed: The common mouse arrow becomes a cross "X". And I can only open one window at one time, the window cannot be minimize or maximize or move around. It even does not have " close" button at the right top side of the window....
by miaomiao
Thu Jul 20, 2017 1:23 am
Forum: C/C++
Topic: How to use two libraries at the same time on Geany
Replies: 24
Views: 3241

Re: How to use two libraries at the same time on Geany

PeterO wrote:
miaomiao wrote:What should I do to solve this?
Learn how to make posts using quote and code tags properly would be a good step ! As it stands your post is pretty incomprehensible !
PeterO
Thank you,I will study and please learn how to talk people properly. Don't be so aggressive.
by miaomiao
Wed Jul 19, 2017 9:37 am
Forum: C/C++
Topic: How to use two libraries at the same time on Geany
Replies: 24
Views: 3241

Re: How to use two libraries at the same time on Geany

Hi, I am using following code in Geany with a laser scanner. #include <stdlib.h> #include <stdio.h> #include <string.h> int playSound( char *filename ) { char command[256]; int status; /* create command to execute */ sprintf( command, "omxplayer -o local giveway.mp3" ); /* play sound */ status = sys...
by miaomiao
Wed Jul 19, 2017 9:30 am
Forum: C/C++
Topic: .wav file: play from a C/C++ program (Raspbian)
Replies: 33
Views: 9295

Re: .wav file: play from a C/C++ program (Raspbian)

You should have got all that when you installed the package .. see the instructions (https://github.com/tinyalsa/tinyalsa) sudo apt-add-repository ppa:taylorcholberton/tinyalsa sudo apt-get update sudo apt-get install tinyalsa sudo apt-get install libtinyalsa-dev The files just use the linux API th...
by miaomiao
Wed Jul 19, 2017 1:41 am
Forum: C/C++
Topic: .wav file: play from a C/C++ program (Raspbian)
Replies: 33
Views: 9295

Re: .wav file: play from a C/C++ program (Raspbian)

It's not complex it's just an error with using deprecated functions so use the new ones that replaced them. Don't have a Pi with linux to try it but it compiles without error so you never know you could be lucky /* tinyplay.c ** ** Copyright 2011, The Android Open Source Project ** ** Redistributio...
by miaomiao
Tue Jul 18, 2017 9:12 am
Forum: General discussion
Topic: How to play .wav or .mp3 file in Geany
Replies: 2
Views: 637

How to play .wav or .mp3 file in Geany

Dear all, does anyone know how to do this? I am using Raspberyy Pi 2 and Geany in C language. I am also using bcm2835 for gpio for a LED. If LED on, play "Giveway.mp3" or "Giveway.wav" audio. I connect a headphone to micro USB. But I dont know how to play sound in Geany using C language. Can anyone ...
by miaomiao
Tue Jul 18, 2017 8:13 am
Forum: C/C++
Topic: .wav file: play from a C/C++ program (Raspbian)
Replies: 33
Views: 9295

Re: .wav file: play from a C/C++ program (Raspbian)

hello, how can I play a .wav file from my C/C++ program (Raspbian) ? I am compiling via the Geany IDE, the files are in my pi/sounds/ subdir, playback via headphone jack or HDMI Hi,I am same situation as you now. Using Geany and want to play a .wav file in C language. Have you solve the problem?Tha...
by miaomiao
Wed Jul 12, 2017 1:13 am
Forum: C/C++
Topic: How to use two libraries at the same time on Geany
Replies: 24
Views: 3241

Re: How to use two libraries at the same time on Geany

change gcc get_distance.o open_urg_sensor.o ../../src/liburg_c.a -lm `/bin/sh ld_wsock.sh` `/bin/sh ld_setupapi.sh` -o get_distance to gcc get_distance.o open_urg_sensor.o ../../src/liburg_c.a -l bcm2835 -lm `/bin/sh ld_wsock.sh` `/bin/sh ld_setupapi.sh` -o get_distance but this is not a geany issu...
by miaomiao
Tue Jul 11, 2017 6:53 am
Forum: C/C++
Topic: A question on Geany.
Replies: 5
Views: 4889

Re: A question on Geany.

PeterO wrote:See my edit to previous reply from 2012 !!! :oops: . Remove the space between -l and bcm2835
PeterO

Thank you, I removed the space already. Still could not make.
Build and compile are successful. Make failed with same error message I posted previously.
by miaomiao
Tue Jul 11, 2017 3:52 am
Forum: C/C++
Topic: How to use two libraries at the same time on Geany
Replies: 24
Views: 3241

Re: How to use two libraries at the same time on Geany

Hi, I am using URG 04LX scanner on Raspberry Pi 2. I can get the capture value when use the urg library only. However, I am trying to check the capture value e.g. when object distance > 300mm , one LED light up. As the LED needs GPIO so bcm2835 library also needs to be used. How should I set my bui...
by miaomiao
Tue Jul 11, 2017 3:45 am
Forum: C/C++
Topic: A question on Geany.
Replies: 5
Views: 4889

Re: A question on Geany.

You need to create a project (if you havn't done so already). Menu Project / Properties / Build Add "-l bcm2835" to the end of the Build command . HTH PeterO Dear Sir, I am trying to use urg04lx laser scanner on Raspberry Pi 2 use Geany (c language). When scanner receive 10 data, it will need to ch...
by miaomiao
Mon Jul 10, 2017 7:06 am
Forum: C/C++
Topic: How to use two libraries at the same time on Geany
Replies: 24
Views: 3241

How to use two libraries at the same time on Geany

Hi, I am using URG 04LX scanner on Raspberry Pi 2. I can get the capture value when use the urg library only. However, I am trying to check the capture value e.g. when object distance > 300mm , one LED light up. As the LED needs GPIO so bcm2835 library also needs to be used. How should I set my buil...
by miaomiao
Fri Jun 30, 2017 4:26 am
Forum: Troubleshooting
Topic: use bcm2835 permission denied on Raspberry pi2
Replies: 1
Views: 457

use bcm2835 permission denied on Raspberry pi2

Hi, I am using Raspberry pi 2 and geany in C language to blink a LED. The compilation is successful but LED cannot blink and show permission denied on RP. I used bcm2835 1.39,connect LED to gpio pin12. The following is my c program on geany and how I download bcm2835. Can anyone tell me how to solve...

Go to advanced search