Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

Raspberry Pi

141

Solutions

258

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

So I'm embarking on a new adventure, that of learning Python, and I'm trying to get some insights on...well, the questions I don't know enough to ask. So here's a list of what I'm trying to accomplish and perspectives/suggestions I'm hoping to gather from the EE community:

Your thoughts on:
  1. Embracing an incredibly loose language (I'm not used to that).
  2. Picking up learning techniques and perspectives which:
        a. Lend themselves to writing code for a broad variety of settings (ie. AI development, microcontroller coding (RPi, Arduino), robotics, IOT). I don't want find out later that I've wasted my time (eg. find out that I should have stuck with Python inside Visual Studio instead of going to the trouble of learning Pycharm -- or a similar kind of misstep).
  3. Biggest surprises and gotcha's coming from the .NET world to Python.  
  4. Anything else you can think of that I really need to know to make Python easier to pick up and make me the most versatile Python coder I can be.

By the way, I've not done any Raspberry Pi or Arduino coding yet (or AI stuff) yet. I'm a programmer by trade, just not in those areas.
0
good day, I am testing serial port communciation on raspberry pi 3 interface with SIM 900 module. The code are attached with error message. Thanks

import serial
import os, time
 
# Enable Serial Communication
port = serial.Serial("/dev/ttyS0", baudrate=38400, timeout=1)
 
# Transmitting AT Commands to the Modem
# '\r\n' indicates the Enter key
 
port.write('AT'+'\r\n')
rcv = port.read(10)
print (rcv)

>>> 
======================== RESTART: /home/pi/SIM900.py ========================
Traceback (most recent call last):
  File "/home/pi/SIM900.py", line 1, in <module>
    import serial
  File "/home/pi/serial.py", line 5, in <module>
    port = serial.Serial("/dev/ttyS0", baudrate=38400, timeout=1)
AttributeError: module 'serial' has no attribute 'Serial'
>>>
0
Hi, I am monitoring weather status remotely. I am intend to use Huawei E303F -usb dongle to push data. I did try sakis3g, doesn't help auto-connection after restart. please do assist me how to set internet connection automatically after restart and network down.
0
Good day, I am newbie in python programming. Can get some information on treading (multi processing). I am doing project with raspberry pi 3 to monitor the following sensor: -
1. temperature
2.humidity
3. CO
At same time using 3g USB dongle to push data to cloud. My critical issue is 3g USB dongle, need to monitor that everytime.
0
This is using a raspberry-pi. My co-worker has defined a bridge called br-lan on top of the physical eth0. Please see attached docx for ifconfig command. Please also see the networking settings on /etc/network/interfaces, /etc/network/interfaces.d/br-lan, and /etc/dhcpcd.conf files. See the ip addressing settings of br-lan as follows:

       ip - 192.168.100.199
       mask - 255.255.255.0
      default gateway - 192.168.100.2
     dns - 203.211.152.66

However, the default gateway setting doesn't seem to work. Please see the results of route -n. I also try to set br-lan to dhcp, and the result is, eth0 grabs the ip - 192.168.100.199.

Appreciate for any help. Thanks in advance.
0
Issue:
Python Script will not run because sshtunnel import to Python 3 does not seem import properly to the Pi.
I am thinking we are using the wrong version of ssh module python script for the Pi but I am struggling.  

 Hardware :
Raspberry Pi 3 Model B -  V 1.2  2015

OS Software :
pi@raspberrypi:~ $ cat /etc/*-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian

Script:
import sshtunnel #import SSHTunnelForwarder
import mysql.connector

ID_String_Last = ["0"]

sshtunnel.SSH_TIMEOUT = 5.0
sshtunnel.TUNNEL_TIMEOUT = 5.0

with sshtunnel.SSHTunnelForwarder(
    ('**********this is the host in here **********'),
    ssh_username='', ssh_password='**********************',
    remote_bind_address=('127.0.0.1,', 3306)
) as tunnel:
    connection = mysql.connector.connect(
        user='*********username**********', password='*****************',
        host='127.0.0.1', port=tunnel.local_bind_port,
        database='northgm7_489.log_1001',
    )


Output:
Python 3.4.2 (/usr/bin/python3)
>>> %Run '17-10- 15 V6.1 Pi mySQL to Ash server.py'
Traceback (most recent call last):
  File "/home/pi/Desktop/17-10- 15 V6.1 Pi mySQL to Ash server.py", line 3, in <module>
    import sshtunnel #import SSHTunnelForwarder
ImportError: No module named 'sshtunnel'


Question:
Does anybody know what version of module is required for this platform so that it …
0
Hello All

I am saying sorry in advance because I know less than zero about the capabilities of the Raspberry Pi, so if my question sounds stupid, take it from where it is coming from :D

Can a Pi run a pre-made GUI interface like windows or do I have to program my own?  If it can run a windows-looking OS can it connect to the internet? If the Pi loses power, when power returns can it be setup (like in windows there is an area for programs to begin at startup) so that the GUI comes back up and the internet automatically reconnects to a site?

Thanks!
0
Hi

I have a Raspberry Pi 3 Model B that a supplier gave me for a demo unit. It runs their OS for their demo software.

I want to try another application today using the Raspian OS. I have a 2nd new formatted SD Card.

Can I just swap the SD Cards in the Pi and install Raspian on the new card or could there be some files/configs from the original OS&app that are stored on some local storage (ie not purely on the SD Card)?

In other words, by swapping the new SD Card into the Pi and installing Raspbian on it, could I damage the original OS or is it 100% contained on the original SD Card? After this new test, I need to go back to the original OS (by inserting the original SD Card).

And yes, I know that Rapsberry Pi's are really cheap, but I can't get one until tomorrow and need to test something today.

ThanksQ!
0
Hi all,

I am using Backuppc, installed on a Linux server, to backup one of my Raspberry Pi.

I've configured the host as you see here:
backuppc_host_settings.png
But, when I run my full backup, I can still see the /mnt folder and its files into it:
backuppc_folders.png
What am I doing wrong?
0
How do I embed VideoLan VLC player in a HTML webpage on Raspbian on RPi3?
0
I would like a script to change audio output from HDMI to Bluetooth (and vice versa) for a Raspberry Pi 3. Not knowing scripting on linux (Raspbian). I have the bluetooth enabled.

Also would like to run this script from a remote computer.

Any assistance appreciated.
0
Which is the best handheld device for learning programming and later also developing programs on the go anywhere?

So that I can write a few lines of code on the metro, bus, when waiting for a flight etc.

I was thinking of this Raspberry Pi, but some don't recommend it for learning programming.

Is there any other alternative, something with long battery life in the size of a big smartphone (or maybe 9 inches display)?
0
Hello,

Recently I used the Retropie emulation software for Raspberry Pi. It is a really cool software and is very handy and attractive. So, I was wondering whether I could replicate these softwares on sd cards, install them on pis and start selling them for some small scale business. I would like to know, if doing such a thing would be legal. Actually, there are quite few ideas about using pis as portable media centers, portable game consoles, a simple portable desktops or just a cheap monitoring cameras. It can be customized to the very end for users and can be an attention grabber in certain circles. But what would be my legal position and what, if any, licensing would it require to start such a business?

Thanks in advance.
0
I have an analog door opener system in my building, this is the phone which opens the door: http://pasteboard.co/4JgctXi4x.jpg
I have a raspberri pi 3 model b, and a Pcf8591 ADC/DAC converter: http://articulo.mercadolibre.com.ar/MLA-641278286-modulo-pcf8591-conversor-4-ad-da-i2c-arduino-raspberry-_JM

What I want to do, is to connect the wires that goes to the analog door opener phone system into Raspberri PI, so I can hear/speak from a sip softphone installed in the raspberry pi.

Is this possible? I measured the voltage in the mic phone/speaker, it's shown in the picture. Not sure how to proceed with this.

Anyone? Thank you!!
0
Hello,

I have been trying to set up I2C communication between my Raspberry Pi and two arduino pro minis using this tutorial:
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

I have done all the steps correctly, installed all the required dependencies and modified all the required files, yet "sudo i2cdetect -y 1" does not detect the arduinos. I have two PCF8591 AD/DA converter modules, and when I connect them to the RPi using the SCL and SDA ports, they are detected and shown by "sudo i2cdetect -y 1". But the arduinos do not show up. This is How I have connected the RPi and the Arduino Minis:
RPi                -> Arduino
3.3V               -> Vin
GND               -> GND
SDA(GPIO2)  -> SDA(A4)
SCL(GPIO3)   -> SCL(A5)

I would like to know what is going wrong here. Please suggest.
0
Hi EE,

I have attached multiple sensors with my Raspberry Pi. I want to power off couple of those sensors from my mobile. I can now only start / stop sensor data reading from my application, but it do not power off / on those sensors. However I can reboot my Pi which power off all of the attached sensors.

My question is, "is there any way to power on/off selected sensors which are attached with my Pi"?

Regards,
Roy
0
Dear experts,

I am a novice in raspberry pi. I want to make a door lock which should be unlocked only when it detects presence of myself within a range not for others.

Is it possible? What type of sensors need to be used for that? Any tutorial or advice?

With regards,
Roy
0
It looks like Java 8 with Swing runs fine on the Raspberry Pi, even the least powerful version of the RPi:
Raspberry Pi Zero.

As I found out jfxswt.jar required to run JavaFX is not included in the JDK normally any more.

How would I find the folder to place it so that JavaFX can be run on the RPi?

( I got it downloaded as part of Gluon)

If this file is included can I also compile JavaFX on the RPi or just run it?
(Does it need to be compiled on a separate desktop computer?)
0
I got the default Raspbian OS on a RaspBerry Pi Zero with Oracle Java 1.8.0_65 installed, along with BlueJ IDE, which is also installed by default in the Raspbian OS.

JavaFX is supposed to be run  on a Raspberry Pi, provided it is not a newer version than Oracle Java 1.8.0_65 which was the last version Oracle came out for the ARM processors in the Raspberry Pi, before
they 'axed' ARM support in Java.

In BlueJ there is no choice in what kind of project you would want to run. (Java, JavaFX, etc.) I can only see hardware-specific Raspberry Pi libraries installed if I look at the 'User Libraries' tab of the created project.

If I try to run a simple JavaFX app just to test, it crashes on the first import, which refers to the package:
javafx.application  the basic package that lets you run JavaFX apps.

See screen shots of my problem described above:  
javafx.application does not exist: correct version of Java installedUser Libraries Installed in the Project Preferences
What's happening here? How can I compile and run JavaFX applications on a Raspberry Pi?
0
I have seen lots of people use a small LED strip plugged in the USB and controlled by a script, and I have seen a lot of people have a big LED Strip plugged into the wall and controlled via a Remoted provided by the manufacture.

I am looking for a way to have the long/big LED strip plugged into the wall and controlled via script, either via USB/PowerShell etc. or Raspberry Pie. I need to know what kind of stuff I need to pull this off and if possible what kind of LEDs to buy. I presume I will need a bread board and some solder wires etc.… but given that I’m using power from the wall what additional equipment will I need so I can use the power from the wall and the controls from the PI to get what I need?
0
Hello,

I have created a bash script on my Raspberry Pi that clicks pictures, mails them to an email address and uploads them to an FTP. It does a few other things like communicate with an external server and look for certain checks and commands.
Now, all these actions require 2 to 3 minutes time to execute and what I require, is a way to rerun the script again and again as soon as all the actions in the current execution are completed.
But as for now, I have to login to the pi and run the command every time to make it work. I want something like this:
_____________________________________________________
#!/bin/bash
#example.sh

//some jobs

sudo sh example.sh
_____________________________________________________
Now my questions are:
1) How to make the script run as soon as the pi is powered on, without requiring the user to login?
2)  Is it safe to execute a script like this from within itself? Or are there better ways to do it?
3) In case of such infinite loops, there may be a crunch of resources and memory. How to clean up the memory or put an auto-restart feature?

Help is much welcome.

Thanks in advance.
0
Is there a script available to backup a raspberry pi device over the network to a Windows share ? I know there is an a local SD backup method but these systems are 100 of miles away from my office

I need to start patching but if something goes wrong I need to know I can get the full working system back.

thanks
0
On Raspberry Pi 3 using Libre Office Calc 5.  Autosave isn't a usable feature of CALC.    I want to be able to use CRON to save a copy of an open file called attend.ods to Documents every 5 minutes.  Then I want to use CRON to write this file to a USB every day at 2.55pm.  I am using GNOME Schedule that specifies | instead of %.
0
I had this question after viewing Have a file from a raspberry pi automatically copied to a usb.

The above worked once.  I changed the time and day to Sunday and ten minutes ahead of the current time but it didn't write it to the USB.  I tried this several times but it didn't work at all.  
I have an open Libre office Calc file on a Raspberry Pi.   RFID tags are read to this file over a day.  As a tag is read it shows a name and time in the adjacent columns.  I have set the file to auto save every two minutes.  I want the auto saved file written to a USB stick using cron.
0
I had this question after viewing Have a file from a raspberry pi automatically copied to a usb.
After writing a file to USB I want to unmount the USB at precisely 3,00pm on a Friday using CRON.
0

Raspberry Pi

141

Solutions

258

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.