Go to advanced search

by tchichua25
Thu Oct 05, 2017 1:39 pm
Forum: Troubleshooting
Topic: toggle keyboard layout keys don't work after reboot
Replies: 1
Views: 270

Re: toggle keyboard layout keys don't work after reboot

Do we have any solution on this? I got the exact same problem.
by tchichua25
Thu Sep 28, 2017 9:28 am
Forum: C/C++
Topic: Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
Replies: 29
Views: 9093

Re: Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

You need to add one of the suggested options to the compile command configured in geany, In the menu.. Build -> Set Build Commands add "-std=c99" after "gcc" in Compile and Build boxes. (I'm looking on a MINT PC but I expect the version on PI is the same). PeterO Compilation finished successfully. ...
by tchichua25
Thu Sep 28, 2017 9:12 am
Forum: C/C++
Topic: Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
Replies: 29
Views: 9093

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

Hey everyone, I'm trying to compile really simple code on my RPi3 using Geany. The code was originally written using code::blocks on windows and it was working without any problem. The errors I'm getting are: untitled.c:33:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode...
by tchichua25
Fri Aug 18, 2017 5:02 pm
Forum: Python
Topic: Can not display the image
Replies: 4
Views: 1229

Can not display the image

I have already installed Pillow. When I'm launching the code it does absolutely nothing from the user side. Can anyone help me?

Code:

Code: Select all

from PIL import Image

image = Image.open('/home/pi/python_games/4row_arrow.png')
image.show()
Image
by tchichua25
Fri Aug 11, 2017 9:40 am
Forum: Python
Topic: Using Python Variables in HTML in multiline Python string
Replies: 8
Views: 20277

Re: Using Python Variables in HTML in multiline Python string

You are writing message not new_message to the html file. Running the modified code on my machine give the following HTML <html> <head></head> <body><img src="https://maps.googleapis.com/maps/api/staticmap?center=44.807572,41.716328&zoom=12&size=400x400&key=[My_api_code]"></body> </html> Looks corr...
by tchichua25
Fri Aug 11, 2017 9:29 am
Forum: Python
Topic: Using Python Variables in HTML in multiline Python string
Replies: 8
Views: 20277

Re: Using Python Variables in HTML in multiline Python string

Do the format operation in a single command. Format expects that every word contained inside curly braces {} will have an associated named parameter. new_message = message.format(Latitude = lat, Longitude = lon) Format works well for simple webpages but if you want to do something more complicated ...
by tchichua25
Fri Aug 11, 2017 9:00 am
Forum: Python
Topic: Using Python Variables in HTML in multiline Python string
Replies: 8
Views: 20277

Re: Using Python Variables in HTML in multiline Python string

Yes. You can do this: a = "webpage.com/image.jpg" message = """<html> <head></head> <body><img src="{URL}"></body> </html>""" new_message = message.format(URL=a) # I've put the formatted message in a new variable # so you can reuse "message" as a template thanks for the answer, I have updated my co...
by tchichua25
Thu Aug 10, 2017 9:55 pm
Forum: Python
Topic: Using Python Variables in HTML in multiline Python string
Replies: 8
Views: 20277

Using Python Variables in HTML in multiline Python string

Hey everyone, I´m trying to write HTML code using python and execute it from browser. Here is my code: import webbrowser f = open('image.html','w') message = """<html> <head></head> <body><img src="URL"></body> </html>""" f.write(message) f.close() filename = 'file:///home/pi/' + 'image.html' webbro...
by tchichua25
Thu Aug 10, 2017 6:11 pm
Forum: General discussion
Topic: Android device as a SECONDARY screen for Raspberry pi
Replies: 4
Views: 1075

Re: Android device as a SECONDARY screen for Raspberry pi

Not true. You can start vncserver from the command line and that runs as DISPLAY=:1. The default with VNC is to mirror the DISPLAY=:0 display, but that's not a hard requirement. So if I just change DISPLAY =: 1 instead of 0 I'll be able to use two screens at the same time? And is there any other me...
by tchichua25
Thu Aug 10, 2017 5:09 pm
Forum: General discussion
Topic: Android device as a SECONDARY screen for Raspberry pi
Replies: 4
Views: 1075

Re: Android device as a SECONDARY screen for Raspberry pi

VNC runs on Andriod. It's trivial to get a VNC server running on your Raspberry. https://play.google.com/store/apps/details?id=com.realvnc.viewer.android Thanks VNC is giving different result as I know. I won't be able to use Android as a Second screen, but as a monitor of the same screen. I'm look...
by tchichua25
Thu Aug 10, 2017 4:42 pm
Forum: General discussion
Topic: Android device as a SECONDARY screen for Raspberry pi
Replies: 4
Views: 1075

Android device as a SECONDARY screen for Raspberry pi

Hey everyone,
I was wondering if I can use my Android device as a !secondary! screen for my Raspberry Pi3.
I'm already using screen via HDMI cable, I was wondering if there is another way, like using Bluetooth or USB to use Android device as a "extra screen" at the same time.
Cheers!
by tchichua25
Wed Aug 02, 2017 7:26 pm
Forum: Troubleshooting
Topic: No wireless interfaces found
Replies: 11
Views: 9687

Re: No wireless interfaces found

You need to use sudo nano filename or sudo vi filename to write to ANY file in /etc. Yes I have done every step properly. Everything was working fine a month ago. Today I got a new project and this problem came out. Can you also delete one of this posts. Internet lagged and accidentally posted it t...
by tchichua25
Wed Aug 02, 2017 6:43 pm
Forum: Troubleshooting
Topic: No wireless interfaces found
Replies: 11
Views: 9687

No wireless interfaces found

Hello everyone! I'm having a problem with my raspberry pi 3 model B. When hitting on network settings button on home screen I'm getting "no wireless interfaces found" error. When entering network settings with the right click I'm getting Config Error: Error saving /etc/dhcpcd.confi The dhcpcd config...
by tchichua25
Thu Dec 08, 2016 5:50 pm
Forum: Networking and servers
Topic: Simple chat [with command lines]
Replies: 3
Views: 768

Re: Simple chat [with command lines]

Get everyone connected on the same LAN subnet and forget about the hardware, IP and TCP layers. Look at netcat (aka nc) and Mosquitto (MQTT broker) as simple ways to get two Raspberries talking. If you want to go with VoIP then look at Asterisk. Hey, thanks for the replay. The thing is that those t...
by tchichua25
Thu Dec 08, 2016 5:11 pm
Forum: Networking and servers
Topic: Simple chat [with command lines]
Replies: 3
Views: 768

Simple chat [with command lines]

Hello everybody! I'm almost new at Raspberry pie. Had done some minor projects with it but now I want to swim deeper. I want to create the application which will connect two Raspberries from different networks. After connection, I want them to be able to chat, send information and even command lines...
by tchichua25
Tue Sep 22, 2015 4:26 pm
Forum: Graphics, sound and multimedia
Topic: URL Audio Player
Replies: 11
Views: 4789

Re: URL Audio Player

RuntimeError: No access to /dev/mem. Try running as root! Do what it says. (There should be many examples of this message and the solution out on the web thingy). To run a program as "root" (the all powerful administrator user) prefix the command with "sudo" on the command line, so instead of typin...
by tchichua25
Tue Sep 22, 2015 1:52 pm
Forum: Graphics, sound and multimedia
Topic: URL Audio Player
Replies: 11
Views: 4789

Re: URL Audio Player

Exactly as it says: missing indentation (after the if statement). Okay so I changed it little bit import os from time import sleep import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.IN) GPIO.setup(24, GPIO.IN) while True: if (GPIO.input(18) == False): os.system('mpg123 -q https://fr...
by tchichua25
Tue Sep 22, 2015 10:26 am
Forum: Graphics, sound and multimedia
Topic: URL Audio Player
Replies: 11
Views: 4789

Re: URL Audio Player

Thank you all for helpful links. I learnt some of the things about python and her is a script I made: import os from time import sleep import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setpup(18, GPIO.IN) while True: if (GPIO.input(18) == True): os.system('mpg123 http://www.sounddogs.com/sound-eff...
by tchichua25
Sun Sep 20, 2015 3:21 pm
Forum: Graphics, sound and multimedia
Topic: URL Audio Player
Replies: 11
Views: 4789

Re: URL Audio Player

it's seems little bit hard for me to understand. I'm newbie in python and raspberry generally. Can you help me to find something little bit more clear?
by tchichua25
Sun Sep 20, 2015 3:13 pm
Forum: Graphics, sound and multimedia
Topic: URL Audio Player
Replies: 11
Views: 4789

Re: URL Audio Player

Thank you ghans. I'll check it and update if I got lost
by tchichua25
Sun Sep 20, 2015 2:38 pm
Forum: Graphics, sound and multimedia
Topic: URL Audio Player
Replies: 11
Views: 4789

Re: URL Audio Player

sudo apt-get update sudo apt-get install mpg123 mpg123 http://www.example.com/file.mp3 ghans Thank you ghans but I need to write a program. It's like Raspberry sends signal to the web-page that it needs link, then it gets link from web page and plays it. So I need to make a player and not just comm...
by tchichua25
Sun Sep 20, 2015 1:12 pm
Forum: Graphics, sound and multimedia
Topic: URL Audio Player
Replies: 11
Views: 4789

URL Audio Player

Hello everyone It's my first post in this forum. I'm participating in hackathon and have only one day left to finish project. We are making musical social network. My question is, can anybody help me (give me sources or something) to write mp3 player which will play music from links. Imagine sounds ...

Go to advanced search