Go to advanced search

by ankith26
Fri Aug 09, 2019 3:44 pm
Forum: Python
Topic: Arduino does not recieve value from raspberry pi
Replies: 8
Views: 380

Re: Arduino does not recieve value from raspberry pi

Here is some sample code i had used in a project few months ago This helped me acheive 2 directional messaging. Arduino side:- void setup() { Serial.begin(9600); // begin transmission } void loop() { String val; while (Serial.available() > 0) { val = val + (char)Serial.read(); // read data byte by b...
by ankith26
Fri Aug 09, 2019 3:24 pm
Forum: Python
Topic: Arduino does not recieve value from raspberry pi
Replies: 8
Views: 380

Re: Arduino does not recieve value from raspberry pi

I know i am replying a bit late but i shall try to solve the problem. try s.encode('ascii') You have to tell python to encode data in ascii cos it does it in utf8 by default. And arduino uses ascii BTW, I noticed you are using port /dev/ttyUSB0.. Check whether arduino is on same port. Cos in my case...
by ankith26
Sat Jul 06, 2019 8:43 am
Forum: Networking and servers
Topic: Raspberry PI with arduino = TCP/IP
Replies: 7
Views: 488

Re: Raspberry PI with arduino = TCP/IP

Yup.. Through sockets that is...
I found this youtube video that shall suite your purpose
https://www.youtube.com/watch?v=l0p-NvmoeUA
by ankith26
Fri Jul 05, 2019 2:56 pm
Forum: Networking and servers
Topic: Raspberry PI with arduino = TCP/IP
Replies: 7
Views: 488

Re: Raspberry PI with arduino = TCP/IP

A Pi to Pi connection would be easier according to me..
On arduino-raspi connection through lan, idk much
by ankith26
Thu Jul 04, 2019 2:31 pm
Forum: Networking and servers
Topic: Raspberry PI with arduino = TCP/IP
Replies: 7
Views: 488

Re: Raspberry PI with arduino = TCP/IP

If you plan to interface arduino and raspi, use serial protocol with usb cable connecting them... This is the easiest way to have any sort of chat or communication
I had many troubles using esp8266 module(I fried 3 modules as i did not know how to handle the thing)
by ankith26
Thu Jul 04, 2019 9:47 am
Forum: Beginners
Topic: Can Pi 4 replace a laptop for streaming?
Replies: 8
Views: 717

Re: Can Pi 4 replace a laptop for streaming?

Answer is yes, but do not take my word for it... AFAIK, while the hardware of raspi4 is good, there is some slowness caused by the latest version(buster) of Raspbian... As you may be knowing, its not been so long since raspi4 is released and the OS will take time to get the most out of the available...
by ankith26
Wed Jul 03, 2019 3:28 pm
Forum: Beginners
Topic: Can Pi 4 replace a laptop for streaming?
Replies: 8
Views: 717

Re: Can Pi 4 replace a laptop for streaming?

Many use the Raspbian OS , but you have ton of other options for OS. With raspbian, you get a browser called chromium which is good as chrome. BTW, most raspberry os are based on linux , which means it is free..
by ankith26
Wed Jul 03, 2019 3:24 pm
Forum: Beginners
Topic: Can Pi 4 replace a laptop for streaming?
Replies: 8
Views: 717

Re: Can Pi 4 replace a laptop for streaming?

Well, Thats a good question. A raspberry pi 4 is *almost* like a pc ,except that the processor is a bit slower being clocked at 1.5 ghz....I would say you can manage with a 2gb ram or 4gb ram(recommended for streaming) version of pi 4
by ankith26
Wed Jul 03, 2019 2:53 pm
Forum: General discussion
Topic: Pi 5 needs only one upgrade, please
Replies: 1
Views: 227

Re: Pi 5 needs only one upgrade, please

I am pretty sure they would not add an extra power pair of pin even for RPi3.. Mainly because it is quite pointless, you could connect the fan to the existing gpio by other methods like hacking the cable a little
by ankith26
Sun Jun 23, 2019 9:33 am
Forum: Python
Topic: itertools(pemutations) in python
Replies: 1
Views: 145

itertools(pemutations) in python

Now, this post will cover some math along with python so bear with me. I am using permutations from itertools module in python.. What this basically does is gives all possible ways of arranging n amount of objects in r slots. if i were to enter 123, my output would be 123 132 213 231 312 321 This wa...
by ankith26
Sun Jun 23, 2019 9:17 am
Forum: Beginners
Topic: Question - Can PI be a http\https web proxy?
Replies: 8
Views: 503

Re: Question - Can PI be a http\https web proxy?

I am not getting your question... Could you be more precise
by ankith26
Sat Jun 08, 2019 6:02 am
Forum: Python
Topic: Emergency Action Required by RPi Foundation
Replies: 31
Views: 1896

Re: Emergency Action Required by RPi Foundation

An interesting observation, I just used pip install and got this interesting warning
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
by ankith26
Sun Jun 02, 2019 6:30 am
Forum: Python
Topic: controlling number of times loop is executed?
Replies: 12
Views: 867

Re: controlling number of times loop is executed?

hippy, I used your frange code like this in python 3 def frange(fromVal, toVal, stepVal=1.0): while fromVal < toVal: yield fromVal fromVal = fromVal + stepVal for f in frange(0.0, 20.0, 0.1): print(f) It gave me this result 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6 0.7 0.7999999999999999 0.8999999...
by ankith26
Sun Jun 02, 2019 6:04 am
Forum: Python
Topic: Emergency Action Required by RPi Foundation
Replies: 31
Views: 1896

Re: Emergency Action Required by RPi Foundation

but the bigger question is, who uses python2 nowadays.... I am sure that python2 will become a forgotten memory within 5 years I myself was confused for a while when i ran python and noticed my python3 code did not work on terminal when it worked on idle Best solution(for now) would be call python a...
by ankith26
Sun Jun 02, 2019 5:36 am
Forum: Python
Topic: controlling number of times loop is executed?
Replies: 12
Views: 867

Re: controlling number of times loop is executed?

hippy wrote:
Sat Jun 01, 2019 7:28 pm
If not going for what I consider my more elegant 'frange()' solution above, I would recommend -

Code: Select all

print("start")
t = 0.0
while t <= 1000.0:
    # some other stuff here
    t += 0.001
print ("complete")
That is a good solution i agree
by ankith26
Sat Jun 01, 2019 10:55 am
Forum: Automation, sensing and robotics
Topic: Help with Relays and GPIO
Replies: 4
Views: 383

Re: Help with Relays and GPIO

You could go for a 3.3v to 5V bi directional level shifter .. these things are available online at low cost and will work
by ankith26
Sat Jun 01, 2019 5:48 am
Forum: Python
Topic: Help reading in serial strings into pi from arduino?
Replies: 6
Views: 851

Re: Help reading in serial strings into pi from arduino?

from serial import Serial from os import system # lets import only what we want data = "" #initialisation(only for first loop) while True: prevdata = data # lets put the data of prev loop in a new variable arduino = Serial('/dev/ttyACM0', 115200) # #this block gets data from arduino and waits for i...
by ankith26
Sat Jun 01, 2019 4:43 am
Forum: Python
Topic: How to get a very accurate delay from 1 milli second in python
Replies: 3
Views: 728

Re: How to get a very accurate delay from 1 milli second in python

Python on raspberry pi is never precise to do perfectly timed stuff in any manner, For that use any microcontroller like arduino
if you have high level stuff, do it on raspberry pi
by ankith26
Sat Jun 01, 2019 4:38 am
Forum: Python
Topic: Cut power to USB ports w/ Python
Replies: 3
Views: 705

Re: Cut power to USB ports w/ Python

os.system(....) usually works for me.
although I heard its not recommended and am not so sure
by ankith26
Sat Jun 01, 2019 4:32 am
Forum: Python
Topic: controlling number of times loop is executed?
Replies: 12
Views: 867

Re: controlling number of times loop is executed?

ghp wrote:
Tue May 28, 2019 7:04 pm

Code: Select all

print("start")
t = 0.0
while True:
    t += 0.001
    if t > 1000:
        break
    # some other stuff here
print ("complete")
This is simple and sufficient for your requirement in python
by ankith26
Sat Jun 01, 2019 4:26 am
Forum: Python
Topic: Apache2 Python Button
Replies: 1
Views: 169

Re: Apache2 Python Button

I have a method to to this, but it will not involve integrating apache and python.Standard Apache with php will do.
note:- this is not the most efficient method, but will work
viewtopic.php?f=36&t=239587
Modify it to suit your needs. If help is required, post here
by ankith26
Wed May 22, 2019 4:36 am
Forum: Camera board
Topic: streaming using piCam
Replies: 2
Views: 270

Re: streaming using piCam

thanks for link
by ankith26
Tue May 21, 2019 6:18 am
Forum: Camera board
Topic: streaming using piCam
Replies: 2
Views: 270

streaming using piCam

Hello all;
My goal is to livestream the video from piCam to my apache server and save it to a mpg file at the same time.... How will i do this
by ankith26
Tue May 21, 2019 4:18 am
Forum: Beginners
Topic: Small part fell off my pi
Replies: 20
Views: 953

Re: Small part fell off my pi

I would want to know if such a thing happened to me..From where will we get these tiny capacitors. Does the RPF issue spare parts or something
by ankith26
Mon May 20, 2019 10:40 am
Forum: Beginners
Topic: Small part fell off my pi
Replies: 20
Views: 953

Re: Small part fell off my pi

From your photo you gave,I can take it as a C58 , but from a raspberry pi 3b.
Saw the schematics of the 3b and it is there. looks like a vital capacitor for the audio jack

Go to advanced search