Go to advanced search

by rpdom
Sun Jan 20, 2019 3:35 pm
Forum: Advanced users
Topic: PHP strtotime problem
Replies: 2
Views: 30

Re: PHP strtotime problem

Because you're not reading the data from the query.

You've read in up to 200 results, but are not using them. Where is your while loop? Where is the mysql_fetch_assoc() function to extract the data from each result?
by rpdom
Sun Jan 20, 2019 3:21 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: Is x86 Debian able to run on this Sony Vaio VPCW222AX laptop?
Replies: 2
Views: 26

Re: Is x86 Debian able to run on this Sony Vaio VPCW222AX laptop?

It will work, but might struggle a bit with only 1GB RAM for things like web browsing which is very memory and CPU intensive. Just don't open too many tabs on your browser.
by rpdom
Sun Jan 20, 2019 3:03 pm
Forum: Advanced users
Topic: PHP "LIMIT" problem
Replies: 5
Views: 43

Re: PHP "LIMIT" problem

Actually, if you are only reading one result, the "while" loop is superfluous. Try this <?php require 'connect.php'; $query = 'SELECT * FROM readings order by ID desc limit 2'; $result = mysqli_query($db, $query) or die('Error querying database.'); $row = mysqli_fetch_assoc($result); echo"{$row['Add...
by rpdom
Sun Jan 20, 2019 2:59 pm
Forum: Advanced users
Topic: PHP "LIMIT" problem
Replies: 5
Views: 43

Re: PHP "LIMIT" problem

I see your problem. $row = mysqli_fetch_assoc($result); while ($row = mysqli_fetch_assoc($result)) The first line there is reading the first result and then doing nothing with it. The "while" loop is then reading from the second result onwards and processing those. Remove the first line and you shou...
by rpdom
Sun Jan 20, 2019 2:40 pm
Forum: Advanced users
Topic: PHP "LIMIT" problem
Replies: 5
Views: 43

Re: PHP "LIMIT" problem

Perhaps show us a bit more of your PHP code?

I can assure you that that query will work under PHP. I do similar queries all the time.

Maybe it is the way you are reading the results of the query.
by rpdom
Sun Jan 20, 2019 11:36 am
Forum: Beginners
Topic: Relay swap
Replies: 9
Views: 182

Re: Relay swap

Yes I was going to use them to drive a 12v dc load as the led strips are going to be outside. I thought the pi sends an on off signal to turn the relay on off as per the coding The Pi will provide a High (3.3V) signal to turn the relay on and Low (0V) signal to turn the relay off. SSDs will turn on...
by rpdom
Sat Jan 19, 2019 6:00 pm
Forum: Troubleshooting
Topic: ribbon connections
Replies: 8
Views: 161

Re: ribbon connections

grnd4sat wrote:
Sat Jan 19, 2019 5:39 pm
The point is that if I power, say, plug #1, I get those 8V on pins #5 and #13 of the cobbler.
The Cobbler board will connect all of the GND pins together, both of the 5V pins together and both 3.3V pins together.

Try checking the cable without the Cobbler connected.
by rpdom
Sat Jan 19, 2019 5:49 pm
Forum: General discussion
Topic: computer power supply
Replies: 17
Views: 435

Re: computer power supply

You'd probably be surprised to know that most of the power supplies I've seen only supply about 3 to 5 amps on the 5v line I would be surprised given that the weedy, more than 10 year old one that I'm looking at as I type this is labelled: +5v 15A +12v 3A -12v 0.5A +3.3v 12A +5vSB 1.5A Yeah second ...
by rpdom
Sat Jan 19, 2019 5:38 pm
Forum: Troubleshooting
Topic: Making a RasPi doorbell
Replies: 2
Views: 69

Re: Making a RasPi doorbell

Your code would be more readable if you used the Code button to show it correctly formatted like this import RPi.GPIO as GPIO import datetime import time import requests import pygame pygame.mixer.init() pygame.mixer.music.load("doorbell-1.mp3") GPIO.setmode(GPIO.BOARD) GPIO.setup(7, GPIO.IN) while ...
by rpdom
Sat Jan 19, 2019 8:25 am
Forum: Beginners
Topic: control two relays with one GPIO pin
Replies: 9
Views: 159

Re: control two relays with one GPIO pin

should I even try without transistor? or is there any other solution that you guys can think of??? Those relay modules are for Arduinos which have 5 volt outputs. The Pi has 3.3 volt outputs, so will probably have trouble driving them directly. See if you can find relays that are designed to be tri...
by rpdom
Sat Jan 19, 2019 8:19 am
Forum: Camera board
Topic: Schematic for camera v2 flex PCB
Replies: 4
Views: 157

Re: Schematic for camera v2 flex PCB

IIRC, the v2 camera includes a custom crypto-chip that the Pi uses to ensure it is a genuine product, not a copy. It won't work on a Pi without that chip. Ah, I see you are going to re-use the main camera board and it is just the sensor sub-board you want to change. That may work. I'm not aware of a...
by rpdom
Fri Jan 18, 2019 8:19 pm
Forum: General discussion
Topic: DS18B20 One Wire sensors slow to show up/go away from directory?
Replies: 6
Views: 129

Re: DS18B20 One Wire sensors slow to show up/go away from directory?

This question has been asked before on the forum but I cant find the thread at the moment , but if I remember correctly I tried searching too, but also couldn't find it. There is also no way to force the pi to detect or forget the DS18B20's connected to the 1-wire bus. Possibly unloading and reload...
by rpdom
Fri Jan 18, 2019 7:39 pm
Forum: General discussion
Topic: DS18B20 One Wire sensors slow to show up/go away from directory?
Replies: 6
Views: 129

Re: DS18B20 One Wire sensors slow to show up/go away from directory?

I believe the standard driver polls the bus for devices every 20 seconds (it might be more).

How long does it take after you unplug a sensor before it is no longer shown as present?
by rpdom
Fri Jan 18, 2019 6:39 pm
Forum: General discussion
Topic: Failing USB hard drive
Replies: 55
Views: 3959

Re: Failing USB hard drive

Well that was a year ago, I'm in the same spot with the same Pi and a different hard drive. Lessons learned: 1. Don't buy refurb hard drives I've never bough a refurb, but (going off on a bit of a tangent here), I have bought a few "used" drives. One of which cost me £10 (including postage) on ebay...
by rpdom
Fri Jan 18, 2019 6:32 pm
Forum: General discussion
Topic: new to soldering - safety questions, etc.
Replies: 46
Views: 881

Re: new to soldering - safety questions, etc.

The first soldering iron I used belonged to my dad. He insisted on filing the tip down. Filing the tip is an absolute NO_NO for modern soldering irons. I can imagine that in the past you did that with the very cheapest old irons which just had a solid copper point, but modern soldering points are p...
by rpdom
Fri Jan 18, 2019 5:58 pm
Forum: General discussion
Topic: computer power supply
Replies: 17
Views: 435

Re: computer power supply

All computer power supplies should have a fixed voltage (the most important bit) and a maximum amount of Amps they can supply if required . The system they are supplying defines the Amperage level. Take a car battery for example. One might be able to provide 600 Amps for a short time to start the en...
by rpdom
Fri Jan 18, 2019 5:47 pm
Forum: General discussion
Topic: new to soldering - safety questions, etc.
Replies: 46
Views: 881

Re: new to soldering - safety questions, etc.

I did that with my first cheapie soldering iron to try and clean it - and it got eaten away next time I used it. The first soldering iron I used belonged to my dad. He insisted on filing the tip down. It always formed a hollow point after a few uses and wore away in no time. I don't use my current ...
by rpdom
Fri Jan 18, 2019 5:42 pm
Forum: General discussion
Topic: GStreamer gst-discoverer not found
Replies: 6
Views: 91

Re: GStreamer gst-discoverer not found

armcapp wrote:
Fri Jan 18, 2019 5:36 pm
rpdom wrote:
Fri Jan 18, 2019 5:02 pm
Please correct me if I have assumed incorrectly.
Thanks for the response.
Thanks for the correction. It has cleared up matters. Hopefully 6by9's response has helped you. :)
by rpdom
Fri Jan 18, 2019 5:16 pm
Forum: Automation, sensing and robotics
Topic: Controlling relays with temperature sensor
Replies: 12
Views: 1232

Re: Controlling relays with temperature sensor

I'd probably use a DS18B20 for the sensor, as they are so easy to set up on the Pi. For the fans, I'd probably use a MOSFET or series of MOSFETs to drive them. That way you can use PWM to control the speed of the fan based on the temperature, rather than having them switch on and off at full speed. ...
by rpdom
Fri Jan 18, 2019 5:02 pm
Forum: General discussion
Topic: GStreamer gst-discoverer not found
Replies: 6
Views: 91

Re: GStreamer gst-discoverer not found

My gstreamer version is 1.10.4. I'm trying to use the gst-discoverer tool, but when I enter $gst-discoverer-1.0 from a terminal I receive a "command not found". Are you literally typing $gst-discoverer-1.0 complete with the "$" in front? That won't work. The $ is supposed to indicate the prompt tha...
by rpdom
Fri Jan 18, 2019 2:29 pm
Forum: General discussion
Topic: new to soldering - safety questions, etc.
Replies: 46
Views: 881

Re: new to soldering - safety questions, etc.

LTolledo wrote:
Fri Jan 18, 2019 1:56 pm
sharpen it after every use.
This I'd strongly disagree with. Most soldering iron bits have a protective coating. Sharpening them will remove this coating and expose the unprotected core which will rapidly degrade through use.
by rpdom
Fri Jan 18, 2019 1:26 pm
Forum: General discussion
Topic: new to soldering - safety questions, etc.
Replies: 46
Views: 881

Re: new to soldering - safety questions, etc.

alphanumeric wrote:
Fri Jan 18, 2019 1:11 pm
rpdom wrote:
Fri Jan 18, 2019 1:04 pm
Search on ebay for "silicone solder sucker"
I have this one, https://www.adafruit.com/product/1597 I like it a lot over the solid tip ones. I bought extra silicon tube for it at the same time.
Yes, that looks identical to the one I got from ebay.
by rpdom
Fri Jan 18, 2019 1:10 pm
Forum: Troubleshooting
Topic: HDMI doesn't work and says no signal
Replies: 5
Views: 122

Re: HDMI doesn't work and says no signal

Try not using NOOBS. Use Etcher to write a Raspbian image to the card. NOOBS tries to be clever and forces some settings to match the monitor it detects the first time you boot it to install an OS. Plain Raspbian checks for an HDMI screen every time it starts up and uses the composite video output i...
by rpdom
Fri Jan 18, 2019 1:04 pm
Forum: General discussion
Topic: new to soldering - safety questions, etc.
Replies: 46
Views: 881

Re: new to soldering - safety questions, etc.

be aware that as you trigger it and the piston moves back, the tip jumps forward. I've got a new solder sucker with a silicone tube for the nozzle. Being flexible it can be pushed right up against the joint to desolder and doesn't jump as much as a regular hard plastic nozzle. It is also heat resis...
by rpdom
Fri Jan 18, 2019 12:53 pm
Forum: Beginners
Topic: Help Making Custom Keyboard
Replies: 4
Views: 81

Re: Help Making Custom Keyboard

You could buy a cheap USB keyboard and rip out the tiny logic board. Look at the plastic membranes to see which key is connected to which connections on the board (eg the "A" key might be connected to 2 and 14 etc.) and solder wires to your keys to match those connections. Then a lot of the hard wor...

Go to advanced search