can a raspberry pi get internet from PC via rj45
I have a raspberry pi 1 B and I want it to be connected to pc through RJ45. The problem is I can't access to internet now Is there any solution to get internet shared via RJ45 from my PC ?
See also questions close to this topic
Connecting Raspberry Pi to obdsim using bluetooth
I have set up a bluetooth serial port on my laptop, so I can use obdsim. I've started obdsim successfully on the laptop and I wanted to connect my raspberry pi 3 to it using bluetooth and a python script so I can get some information off of the obdsim e.g. speed, throttle position etc.
entertestcommand = "atz" serverMACAddress = 'XX:XX:XX:XX:XX:XX' port = 9 s = bluetooth.BluetoothSocket(bluetooth.RFCOMM) s.bind((serverMACAddress, port)) s.send(testcommand)
I keep getting error: bluetooth.btcommon.BluetoothError: (107, 'Transport endpoint is not connected')
Total beginner here,
Thanks for any help
Raspberry Pi Camera output is slow
I just got a Raspberry Pi Zero with camera. I was able to record some video in a Python script using:
with picamera.PiCamera(resolution=(1280,720), framerate=30) as camera: videofn = "video_"+datetime.datetime.now().strftime("%Y_%m_%d_%I_%M_%S%p")+".h264" camera.rotation = -90 camera.start_recording("/home/pi/"+videofn) camera.wait_recording(900) camera.stop_recording
Recordings have been saving fine but I eventually noticed it looked slow when I played it in vlc. I recorded another while I put a stopwatch in front of it for a minute. When I play that video, I found that the stopwatch counted up 1 minute but that accounted for about 1 minute 10 seconds of real-time. Does this have something to do with the framerate = 30? How would I go about fixing videos already recorded?
Break from loop after given a number
I am having issue to have my "break loop" to work, it doesn't throw any error so I can't even see what's happening. It is the option 3 when I tell the script to start blinking my LED. Originally I was looking into some ways if there is a way to run your loop and go back to your MainMenu while the loop is still running, But that wasn't the options, so I wanted to try something similar to use "for number in range(10):"
def loop(): while True: os.system('clear') print print ('1. ON') print ('2. OFF') print ('3. Blink') print choice = int(raw_input('1-[ON], 2-[OFF]: ')) if choice == 1: print print ('Turning ON') GPIO.output(LedPin, GPIO.LOW) # Led ON elif choice == 2: print print ('Turning OFF') GPIO.output(LedPin, GPIO.HIGH) # Led OFF elif choice == 3: number = 0 for number in range(10): number = number + 1 if number == 5: break GPIO.output(LedPin, GPIO.LOW + str(number)) # Led ON time.sleep(0.05) GPIO.output(LedPin, GPIO.HIGH + str(number)) # Led OFF time.sleep(0.05) #print ('Number is ' + str(number))
this example works fine:
number = 0 for number in range(10): number = number + 1 if number == 5: break # break here print('Number is ' + str(number)) print('Out of loop')
Number is 1 Number is 2 Number is 3 Number is 4 Out of loop