Go to advanced search

by scotty101
Mon Jun 24, 2019 9:13 am
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 279
Views: 12390

Re: Raspberry Pi 4 Thread - general discussion

Let me get this right. We release a new Pi, with loads of extra features, and amazing specs, at an amazing price. And for your first post you want to turn stuff off or remove it completely? Stuff that us engineers have spent years of our lives on. Sometimes, I just despair. Still, I guess it happen...
by scotty101
Mon Jun 24, 2019 9:06 am
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 279
Views: 12390

Re: Raspberry Pi 4 Thread - general discussion

tinkerBOY wrote:
Mon Jun 24, 2019 9:04 am
Are the DPI GPIO pins still the same?
Check the preliminary datasheet. Looks like they are the same
https://www.raspberrypi.org/documentati ... minary.pdf
by scotty101
Mon Jun 24, 2019 8:58 am
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 279
Views: 12390

Re: Raspberry Pi 4 Thread - general discussion

Well done people, I've ordered one already - will probably get a 4GB later ....when they become available What do you mean not available? I see the option to order it from the United Kingdom sites? 4GB out of stock on Pimoroni and thepihut Glad I got in there early to order a 4GB one then! Excellen...
by scotty101
Mon Jun 24, 2019 8:23 am
Forum: Python
Topic: Sense Hat: using joy stick to call script?
Replies: 2
Views: 49

Re: Sense Hat: using joy stick to call script?

Yep that the problem I changed the while loop to the following and it worked fine while True: for event in sense.stick.get_events(): if event.action == "pressed": if event.direction == "up": time() sense.clear() timer = [] See https://trinket.io/python/5183104540
by scotty101
Fri Jun 21, 2019 11:47 am
Forum: General discussion
Topic: Drug testing using Raspberry Pi
Replies: 20
Views: 761

Re: Drug testing using Raspberry Pi

We're testing whether an individual might have injected or ingested some drug, legal or not Through what method do you wish to test this? Blood sample, urine sample, cheek swab, hair sample? Or do you want to do this by a more passive means like a "sobriety test" maybe measuring their reaction time...
by scotty101
Fri Jun 21, 2019 7:43 am
Forum: Networking and servers
Topic: json data from server to client
Replies: 12
Views: 382

Re: json data from server to client

How about you try that and find out whether it works or not?
by scotty101
Thu Jun 20, 2019 8:52 pm
Forum: Other programming languages
Topic: How to include a python function in the source of html iframe?
Replies: 4
Views: 245

Re: How to include a python function in the source of html iframe?

I personally don't know of any forum, blog or CMS offerings written in Python. Everything seems to be in PHP. What's not is done in Node.js. Let's start with Django, a very popular web framework behind many websites and continue on to this list of major websites written with python; Google, YouTube...
by scotty101
Thu Jun 20, 2019 11:14 am
Forum: General discussion
Topic: Drug testing using Raspberry Pi
Replies: 20
Views: 761

Re: Drug testing using Raspberry Pi

We have to think of a research title and I thought of creating a drug tester by using Raspberry Pi. I'm new to this kind of thing. What could you recommend for the device? I'm really trying to think of research titles but I can't come up with one :cry: How exactly would you detect drugs with a Rasp...
by scotty101
Thu Jun 20, 2019 11:11 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: UART touchpad communication
Replies: 3
Views: 164

Re: UART touchpad communication

I recently dismantled my broken Toshiba Chromebook for spare parts and was able to salvage the touchpad. The cable for the touchpad, however, is I believe a UART cable with 6 pins. Is there any way to use either a Raspberry Pi or an Arduino to convert the UART signal into something a Raspberry Pi c...
by scotty101
Thu Jun 20, 2019 8:53 am
Forum: Advanced users
Topic: Get the Raw data from a Zigbee-Sensor!
Replies: 7
Views: 328

Re: Get the Raw data from a Zigbee-Sensor!

I like something like Java, Php and Bash. My Database is a sql database. Mariadb if you know. Had you said Python and Sqlite, I would have been able to help. PHP and Bash are unlikely to be suitable for this. Java might work but I don't program in Java and am not aware of the MQTT library for Java.
by scotty101
Thu Jun 20, 2019 8:48 am
Forum: Troubleshooting
Topic: Not powering up after microUSB replacement.
Replies: 2
Views: 98

Re: Not powering up after microUSB replacement.

Entirely possible that you damaged/ripped off a PCB track when fitting the new micro USB socket.
Or maybe you have a short somewhere.
by scotty101
Thu Jun 20, 2019 7:40 am
Forum: Advanced users
Topic: Get the Raw data from a Zigbee-Sensor!
Replies: 7
Views: 328

Re: Get the Raw data from a Zigbee-Sensor!

Which programming language do you wish to use and what database type?

You'll have to write a program that subscribes to the MQTT topic and when it receives a message, runs a query on the database to store the information.
by scotty101
Thu Jun 20, 2019 7:36 am
Forum: General discussion
Topic: Display-o-tron HAT projects
Replies: 24
Views: 1170

Re: Display-o-tron HAT projects

Try changing the line humid = str(float ("%3.f" % humidity)) #define output formats for Humidity and Temperature to humid = str(float ("%3.f" % Humidity_Value)) #define output formats for Humidity and Temperature You seem to be doing a lot of unnecessary conversions between floats and string and the...
by scotty101
Wed Jun 19, 2019 8:33 pm
Forum: General discussion
Topic: Display-o-tron HAT projects
Replies: 24
Views: 1170

Re: Display-o-tron HAT projects

Can you share a more complete code example? What sets humid for example?

I suspect you aren't converting humid to a string but it is impossible to tell with the partial example that you've shared.
by scotty101
Wed Jun 19, 2019 8:28 pm
Forum: Python
Topic: How to send data from remotely hosted HTML form to Pi
Replies: 2
Views: 145

Re: How to send data from remotely hosted HTML form to Pi

Why not host the HTML on the raspberry pi?
Then you can use Python/Flask or Node.js to serve the HTML and receive any commands to control the devices.
I'd use JavaScript to send HTTP requests from the user's browser back to the server.
by scotty101
Wed Jun 19, 2019 10:12 am
Forum: Networking and servers
Topic: json data from server to client
Replies: 12
Views: 382

Re: json data from server to client

gauravsharma0190 wrote:
Wed Jun 19, 2019 9:53 am
Actually i have two code of server and client in TCP/UDP communication , and i am communicating through it mean message to the client and server.
If you already have code for TCP communication, why can't you just send the JSON data in the same way?

I have no idea what "it mean message" is..
by scotty101
Tue Jun 18, 2019 1:31 pm
Forum: Networking and servers
Topic: json data from server to client
Replies: 12
Views: 382

Re: json data from server to client

hello scooty i read the flask library . i just read the http and REST API from which i can use to send and receive the json data using the get and post request. Here i write a code in python import json, requests data = { 'user' : 'gaurav' 'var' : '7892' } payload = json.dumps(data) url = ' ' r = r...
by scotty101
Tue Jun 18, 2019 7:36 am
Forum: Networking and servers
Topic: json data from server to client
Replies: 12
Views: 382

Re: json data from server to client

Python has lots of wonderful libraries to help with things like this (although the core library also contains ways to do this). You can setup an HTTP server in python using Flask and on the other end you can use Requests to access the server and get the JSON data. http://flask.pocoo.org/ https://2.p...
by scotty101
Fri Jun 14, 2019 11:07 am
Forum: Advanced users
Topic: temperature
Replies: 1
Views: 187

Re: temperature

/usr/bin/vcgencmd measure_temp is the GPU Temp and the other is the CPU temp.

See http://kernelreloaded.com/formatting-ou ... e-sensors/
by scotty101
Thu Jun 13, 2019 12:16 pm
Forum: Automation, sensing and robotics
Topic: Communicating with other sensors distributed to other spaces
Replies: 5
Views: 699

Re: Communicating with other sensors distributed to other spaces

I am having a similar kind of project bt on large scale, so can't use wifi. So how can I send sensors data from nodemcu to rpi without internet and most importantly it's on large scale, you can assume the size to be of a farm. A farm is the same size as a piece of string. Unspecified length anywher...
by scotty101
Wed Jun 12, 2019 7:32 am
Forum: Python
Topic: Using datetime to control lights
Replies: 11
Views: 303

Re: Using datetime to control lights

Zachgober, If you want help fixing your python code, it generally helps if you share the python code. Remember to put it inside code tags so it appears like this

Code: Select all

while True:
    if code_not_in_tags:
        print("Code is unreadable")
by scotty101
Wed Jun 12, 2019 7:25 am
Forum: Python
Topic: Variable Not being Defined
Replies: 3
Views: 187

Re: Variable Not being Defined

Would also be helpful for you to share a more complete code example and the full error message that you receive. At the moment, we have no idea which variable is the problem.
by scotty101
Wed Jun 12, 2019 7:22 am
Forum: Python
Topic: How to change any value in python with an input
Replies: 15
Views: 401

Re: How to change any value in python with an input

Shaurya wrote:
Wed Jun 12, 2019 6:04 am
But then how will I change the value of x with inputs???????
If you look at gordon77's code example, the value of x is increased every time the GPIO.Input(29) is true. This is done by the line "x += 1" which means add 1 to the current value of x.
by scotty101
Thu Jun 06, 2019 10:38 am
Forum: Networking and servers
Topic: Connecting Smart TV to internet with RPi1 Model B
Replies: 8
Views: 302

Re: Connecting Smart TV to internet with RPi1 Model B

It's been covered before on here, you bridge the WiFi and Ethernet interfaces.

viewtopic.php?t=132674
by scotty101
Thu Jun 06, 2019 10:08 am
Forum: Other projects
Topic: How to internal website send command to terminal raspbian
Replies: 5
Views: 206

Re: How to internal website send command to terminal raspbian

Perhaps you could share your code? As an example, I created something a while back to send IR commands via a python script from a web page. This allowed me to control my TV from a web browser on my phone. https://github.com/scotty3785/pi_tv_remote It uses python-flask, a framework for creating dynam...

Go to advanced search