Raspberry Pi

154

Solutions

273

Contributors

The Raspberry Pi Foundation works to put the power of digital making into the hands of people all over the world, so they are capable of understanding and shaping our increasingly digital world, able to solve the problems that matter to them, and equipped for the jobs of the future.

We provide low-cost, high-performance computers that people use to learn, solve problems and have fun. We provide outreach and education to help more people access computing and digital making. We develop free resources to help people learn about computing and how to make things with computers, and train educators who can guide other people to learn.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am trying to put this function in node-red. While testing on python its work on raspberry pi - serial port perfectly. Currently i wanted to try on node-red via raspberry pi too.

#rpi serial connections
#Python app to run a K-30 Sensor
import serial
import time
ser = serial.Serial("/dev/ttyS0",baudrate =9600,timeout = .5)
print " AN-137: Raspberry Pi3 to K-30 Via UART\n"
ser.flushInput()
time.sleep(1)
for i in range(1,21):

 ser.flushInput()
 ser.write("\xFE\x44\x00\x08\x02\x9F\x25")
 time.sleep(.5)
 resp = ser.read(7)
 high = ord(resp[3])
 low = ord(resp[4])
 co2 = (high*256) + low
 print "i = ",i, " CO2 = " +str(co2)
 time.sleep(.1) 

Open in new window

0
Hlw,

My self Abhinay Raj

I had made project on self driving car, In this project car will be move forward by follow the road lane using raspberry pi camera and some python program.

I want to develop this project by including fully automation in the self driving car. for this i have made one android application for booking cab(like uber). App. is working like such a way,that we will book cab same like as uber where app. will take the user current location and destination location. So, now i want to send the both (current,destination) location to the firebase database.And it will send to the raspberry pi than raspberry pi motor will move or follow the google map to arrive to the user first and than to the destination location.

Suppose that, if we have to go somewhere unknown place, here we use the google map, and it will provide me road on the map which is focus by blue line.. Means, i want to ask that similarly raspberry pi will also get loacation and it should follow the (blue line) the google map.

Please Help me....how can i do this...

thanks...
0
Hi there,

I am try to learning a home automation system on Raspberry pi through GSM, but unfortunetally I am getting error in my python coding.
The Problem is When I want to print my received message that time I am getting this kind of response b'b\xf1\xe2\xe2\xe2' ,
So, I cant able to decode that message and If I decode that the python giving me a error like unorderable types: int() < str(().

So , I am really confused about it , can anybody help me out in this problem, How I can match my actual message and print?

here is my code and its output.
import serial
import time
import os

print('Welcome to Test GSM SIM900')
ser = serial.Serial ("/dev/ttyS0", 19200, timeout=1) #9600 is the default for SIM900A modem
print('Waiting for Response')

ser.write(('AT+CMGF=1' + '\r').encode('utf-8'))
time.sleep(1)
print('Connection Establish')
ser.write(('AT+CMGDA="DEL ALL"'+'\r').encode('utf-8'))
time.sleep(1)
print('All messages has been Deleted')

message = ser.read(1000) # inWaiting- get the number of bytes in the inout buffer

print(message)

while True:
      if message == 'LED1':
          print ("LED 1 is on")
      elif message == 'LED2':
          print ("LED 2 is on")
      elif message == 'EXIT':
          print ("shuting down")
          ser.close ()
          break
      else:
          print ("Try again")
          break

ser.close() #close the serial port
  
>>> %Run GSMTRY.py
Welcome to Test GSM SIM900
Waiting for Response
Connection Establish
All 

Open in new window

0
how rfid reader read uhf rfid tag using python language.........plz help mi
0
how raspberry pi 3 model connect with UHF RFID Reader version ETS-IR O1 with using interface rs-232
0
Hi

I am doing a collage project where i need to host a home server   Using Nginx  and basically LAMP  with  wordpress.
I have managed to set my home router so it is able to send anything on the 80 port to the Raspberry PI    everything is perfect   apart from i need to try and get 443 SSL working.

I have installed CertBot and created all the keys

The website files are in /Var/www/html   (Wordpress site)

I have updated the Nginx  default file  located in /etc/nginx/sites-available/   which i am pretty sure is the issue.    I have a chron job set up for auto renewal of the SSL.   Everything seams to be set up perfectly   apart from the Nginx   config doesnt seam to be able to  serve SSL pages.       I really hate to ask but i have been trying for a few days now   cloning SD cards  to ensure i do it each time with the clean install  but  i cant work it out.    

/etc/nginx/sites-available/default

server {
    listen 80 default server;
listen [::]:80 default_server;

listen 443 ssl;
    root /var/www/html/;
    index index.php index.html index.htm;

    server_name My-Domain.com;
return 301 https://$server_name$request_uri;
ssl_certificate /etc/ssl/certs/dhparam.pem
ssl_certificate /etc/letsencrypt/live/my-domaincom/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/my-domain.com/privkey.pem;

    location / {
        try_files $uri $uri/ =404;
    }


  }
0
i change my raspberry pi IP address to static and it was working perfectly but after few days when i scan it via advance IP scanner it is showing dead but all the lights are coming.
0
Thank you for your time to read & answer this question.

So, the project I am currently doing is a child car alert system using RPi 3 Model B. The RPi would be able to detect the temperature, sound and presence of the child (PIR Sensor) from a child car seat in a vehicle then the Android app through BLE will be able to receive and display data from the RPi & send alert through app when sensors in RPi is triggered (i.e. high temperature in car).

So far, I have managed to build the RPi board with all sensors attached using Adafruit IDE in Raspbian. The problem now is building an Android app that could connect to my RPi board. I have researched some viable options and mostly suggested App Inventor. Is this true?

I am hopeful if anyone could guide me through any webpage or video tutorial on how to execute my project as I am very inexperienced in using RPi.

P.S: I am very new to RPi (~ 3 months) and learn solely from the Net so I appreciate any comments or tips from other experienced users on how to carry on with this project.
0
I am trying to install wordpress on my Raspberry Pi. I can install apache2 and php without a problem
When I try and install MySQL I dont get asked to change the Password after the install
Also when I try to install php5-mysql I get an error saying dependency is missing

How do I fix this so I can continue the Wordpress install
0
pip install twilio
works perfectly on a Pi2.   Just bought a new Pi3 with the latest NOOB.  
same version of python (2.7.9), same version of pip (1.5.6).  I keep getting the error:

TypeError: __str__ returned non-string (type Error)

Googling around, I checked and verified that
- no network issue, Chromium connects to https://pypi.python.org/simple/twilio/
- my date/time on the computer is correct
- some talk about --trusted-host=http://pypi.python.org/simple/ but that parameter is not valid on pip
- some talk about creating an /etc/pip.conf file and adding trusted-host=pypi.python.org but that makes no difference (assuming pip every reads that file...)

My guess is that it has something to do with the SSL certificates... but I have no idea how to solve it.  
sudo apt-get install libssl-dev did not help

Thoughts?
pip.log
0
My son has set up a Raspberry Pi in the home to display images. He enabled FTP and told me to connect via WinSCP. I have done this, and I see all the folders on the Raspberry Pi. However, I cannot upload images or do anymodifications on the raspberry pi due to a permissions problem.

Any ideas what could be the cause of this?

I am logging in with his username and password, which has full rights to the Pi.

Thank you.
1
I have about 80 desktop users. Each has an APC SmartUPS.  We've never bothered connecting them via USB to the computers because we didn't want to contend with the PowerChute management software.  But this is no good. As it is, the way I usually find out that a battery is no good is when we have a power outage and someone's UPS fails. I need to get a better system than that :-)

Has anyone found a centralized UPS management solution? APC has a business edition of PowerChute, but it's limited to just 25 devices. What's up with that? I need a that could monitor and manage all of our UPS devices.

Someone should build a Raspberry Pi solution for this that connects to the UPS via USB and the network via WiFi.
0
Hi everyone,

So I've spent the past week reading and trying to understand the python language and more importantly the CherryPy web framework.
To be honest Im getting no-where quickly...

What I'm trying to do is simply build a frontend to a Raspberry Pi project I've been developing.
The CherryPy web framework seems perfect for this as it is small and contains its own web server that would suite my needs perfectly.

An admin user attaches to the Raspberry PI AP and is immediately directed to a webpage (This I have solved quite easily).
The webpage is presented by the CherryPy web server.

I have an index.html which it returned from my CherryPy script.

import os, os.path, sys
import cherrypy

# Configuration file to access server over network and define ports
cherrypy.config.update("server.conf")

class menu(object):
    @cherrypy.expose
    def index(self):
        return open('index.html')

(Fairly simply until now I know)

What I would like to do is have buttons on my index.html that can be pressed and return os.system('mkdir boom')  (obviously my system commands will be a little more than this.. They will start and stop services.

The buttons will eventually be toggle switches, so going to the page will need to return the current status of the running process. Red if the process is not running and Green if it is running. I think I need to be interacting with jquery on my index.html page to achieve this...

This whole area is new to me and …
0
Is it possible to program the Raspberry PI camera to do OCR?
Need it to recognize a list of characters and when seen, write the info to a file.  
Need the following info with each entry;
Captured data
Date and time (down to the second)
Location (can be GPS or user entry)

And once a day (or at user request) upload data to a online database.
0
I need a code in Embedded C for making call andi sending SMS by using Raspberry pi 3 and GSM SIM 900. Please help me. I am new to Raspberry pi
0
Hi experts.

I have been trying to automate some infrared command through my Raspberry Pi, using the IRDroid-Rpi infrared transceiver (http://www.irdroid.com/2016/10/discover-how-to-turn-raspberry-pi-into-a-infrared-remote-control-using-the-irdroid-rpi/). These commands must be first learned from my Set Top Box infrared remote control using irrecord, but it is a commercial remote.

I have followed the documentation and finally got the IRDroid-Rpi to work. However, it will only work if I learn commands from commercial remote controls like a Samsung TV remote control. My STB remote control is non commercial, and I have not been able to make the IRDroid-Rpi learn and send the commands correctly. Here is my procedure and files:

pi@raspberrypi:~ $ sudo irrecord -f -d /dev/lirc0 lircdtp2.conf

Press RETURN now to start recording.
................................................................................
Found const length: 108301
Please keep on pressing buttons like described above.
Creating config file in raw mode.
Now enter the names for the buttons.

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_CHANNELUP

Now hold down button "KEY_CHANNELUP".
Sorry, something went wrong.
Try again.
Got it.
Signal length is 3


# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Tue Apr 25 23:40:23 2017
#
# contributed by 
#
# 

Open in new window

0
I am designing my first Raspberry Pi app .... It tracks a volley ball game ... I have found a lot of motion tracking ... I need a tutorial teaches me how to map the court ... the court has white lines ... when the ball goes beyond the white line an LED will light up ... how can I get raspberry to map the court ?
0
Hello Everyone,

I am working to set up a raspberry pi as a vpn through my pfsense router. I have the pi configured and I am now having issues getting it to pass through the firewall to a public ip. If that won't work I'm looking for a username/password based vpn akin to pptp to add simplicity for my users (they don't want to use another client like open vpn) I'm fairly new to configuring vpns and I'm looking for a little guidance.
0
Hi,
this is the second time I receive this type of requirement but it is the first time I think I will try to achieve.
Once, a client asked me to make a system that allow to track their truck fleet. Now, for an Airsoft store, I have been requested to develop a software that allows to track team members with any electronic device.
In bothe cases a mandatory requirement was to display all devices at once, meaning in 1-screen multiple trucks or team members.
I think, one way, to achieve this is, probably, to provide 1 gps device connected to a raspberry (my favorite) or arduino board to every truck/team member and then display 'dots' per each one maybe using google maps but I have not found someway multiple locations can be displayd at once in google map.
So, I would like from you to tell me about any similar project you may remember, or suggestions so I use can start reading about it.
Thanks a lot.
Note: I have searched for existing devices but I have not found something that works for multiple 'dots', in 1 screen and close to realtime.
0
I am using chromium to autostart a webpage into a kiosk.  but my webpage needs a username and password, I have the username and password stored but is there away that when page loads select enter? To continue past the login screen.
0
Good day experts...

I have successfully installed the ptpd package on a Raspberry Pi (v2)...long story of why, but need to try and make it work.  My Grandmaster clock is located at x.x.x.28 and is providing PTP (and NTP) to a number of other devices, so I believe it is setup correctly.  I start ptpd from the command line as root (see command below), but the output shows it never anything other then "lstn_init" state.

Using tcpdump, I don't see any related traffic going out of the interface.  If I run ptpd in "hybrid" mode I do see some multicast traffic outbound, but our GrandMaster is set to use unicast only.

Anyone with thoughts or suggestions?  Thanks!

****** Command ******
ptpd --statistics-file I /var/log/ptpd.stats --interface eth0 --ptpengine:ip_mode=unicast --ptpengine:log_delayreq_interval=0 --ptpengine:unicast_address=x.x.x.28 --ptpengine:delay_mechanism=E2E --foreground --verbose -D -f /var/log/ptpd.logd
****** /Command ******

****** Output ******
Runtime debug not enabled. Please compile with RUNTIME_DEBUG
2016-03-22 13:21:41.078628 ptpd2[2828].startup (info)      (___) Configuration OK
2016-03-22 13:21:41.079464 ptpd2[2828].startup (info)      (___) Successfully acquired lock on /var/run/ptpd2.lock
2016-03-22 13:21:41.080276 ptpd2[2828].startup (info)      (___) Successfully bound ptpd2 to CPU core 0
2016-03-22 13:21:41.082341 ptpd2[2828].startup (notice)    (___) PTPDv2 started successfully on eth0 using "slaveonly" preset (PID 2828)
# …
0
Hey Guys -

I used to have an extensive media collection for which I've spent a ton of time and resources ripping from physical to digital media.  Currently, I have 20+tb which is mostly comprised of my ripped Blu-Ray movies.  All media is stored on my home "server" on a single 26tb+ partition which is made up of x10 physical drives (x9 SATA & x1 SSD) binded together using StableBit DrivePool (works great :)).  Unfortunately, I still have more to go and each time I must add storage, it's costing more.   For the last upgrade, I not only purchased another 4tb drive, but also a SATA card plus upgraded my power supply from a 650W to 1000W.  Besides the cost, nothing I have is backed up!  At the end of this post is my current setup.

I play all of my media using a few methods.  Most local playing on TV is via a different dedicated computer running Kodi (XBMC).  The second most used playback is Plex which sends the media out in many ways.

My Question
When thinking about the above situation recently, I thought it may be a good solution to purchase cloud-based storage and start moving media there.  I'd need at least a few TBs to start, but would also need for the service to offer certain features to make it compatible with my setup.  The need for local sync also wouldn't be required or used.  Below is the feature list I'd need:

Required Features for Cloud Storage to Work
Ability to have multiple TBs of space to purchase
Preferably multiple
0

Raspberry Pi

154

Solutions

273

Contributors

The Raspberry Pi Foundation works to put the power of digital making into the hands of people all over the world, so they are capable of understanding and shaping our increasingly digital world, able to solve the problems that matter to them, and equipped for the jobs of the future.

We provide low-cost, high-performance computers that people use to learn, solve problems and have fun. We provide outreach and education to help more people access computing and digital making. We develop free resources to help people learn about computing and how to make things with computers, and train educators who can guide other people to learn.