Go to advanced search

by GerardWassink
Mon Dec 24, 2018 12:28 pm
Forum: Advanced users
Topic: Hardware version suitable for USB boot?
Replies: 3
Views: 1096

Hardware version suitable for USB boot?

I have three RPi's of which I did a 'cat /proc/cpuinfo', results below. How can I tell which of these is suitable for USB boot right of the bat, and for which do I have to change the OTP bit? A Pi 2B, hardware info: Hardware : BCM2835 Revision : a01041 Serial : 000000008adec31f A Pi 3B, hardware inf...
by GerardWassink
Mon Dec 14, 2015 10:01 am
Forum: Python
Topic: Overwrite previous output Help!(Python 2.7.9)
Replies: 5
Views: 4552

Re: Overwrite previous output Help!(Python 2.7.9)

James,

Tested your exact code on OS X Yosemite (python version 2.7.10) and it behaved as it should, printing on the same line every time.

Also did a test on the Raspberrypi (python version 2.7.3), same behavior.

Gerard
by GerardWassink
Mon Dec 14, 2015 8:55 am
Forum: Python
Topic: Overwrite previous output Help!(Python 2.7.9)
Replies: 5
Views: 4552

Re: Overwrite previous output Help!(Python 2.7.9)

James, From your text I gather that you want your output to be printed at the beginning of the same line every time. At the risk of stating the obvious, in "the olden days" of typewriters, teletypes and telexes we used to have two symbols controlling the 'wagon' or 'carriage' of the typewr...
by GerardWassink
Sun Dec 13, 2015 4:20 pm
Forum: Python
Topic: double loop if/elif
Replies: 11
Views: 2397

Re: double loop if/elif

Wouldn't this make more sense and as well simplify the code? if temperature > 5: GPIO.output(25,GPIO.LOW) GPIO.output(4,GPIO.LOW) if temperature < 6 and humidity >= 50: GPIO.output(25,GPIO.HIGH) if temperature < 1 and humidity >= 50: GPIO.output(4,GPIO.HIGH) It also takes care of what I deemed to b...
by GerardWassink
Sun Dec 13, 2015 9:57 am
Forum: Python
Topic: double loop if/elif
Replies: 11
Views: 2397

Re: double loop if/elif

Wouldn't this make more sense and as well simplify the code? if temperature > 5: GPIO.output(25,GPIO.LOW) GPIO.output(4,GPIO.LOW) if temperature < 6 and humidity >= 50: GPIO.output(25,GPIO.HIGH) if temperature < 1 and humidity >= 50: GPIO.output(4,GPIO.HIGH) It also takes care of what I deemed to be...
by GerardWassink
Sun Dec 06, 2015 12:51 pm
Forum: Beginners
Topic: Changing the default login user from pi
Replies: 3
Views: 1263

Re: Changing the default login user from pi

This has been discussed lots of times on this forum.

Perhaps this link is for you?

HTH,

Gerard
by GerardWassink
Sat Dec 05, 2015 4:05 pm
Forum: Python
Topic: Updating a mysql data from python
Replies: 5
Views: 2688

Re: Updating a mysql data from python

Search the file MySQLdb for something 'commit' like...
by GerardWassink
Sat Nov 14, 2015 10:59 am
Forum: Python
Topic: Loop every x minute on the the change of the minute
Replies: 10
Views: 2393

Re: Loop every x minute on the the change of the minute

A crontab entry for your case to run every fifth minute might be: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/pi/yourstuff Or, for example when you would like to run it at the 3 and 7th minute: 0,3,7,10,17,20,27,30,37,40,47,50,57 * * * * /home/pi/yourstuff And in "yourstuff" you ask fo...
by GerardWassink
Sat Nov 14, 2015 10:50 am
Forum: Python
Topic: Loop every x minute on the the change of the minute
Replies: 10
Views: 2393

Re: Loop every x minute on the the change of the minute

I'm trying to code a clock which is shown on some LEDs in a pickle formation, the clock only shows 5, 10 15 etc past the hour. How can I best get the python code to update the LEDs every 6 and and 4 minutes e.g to update the time at xx.x3 and xx.x7? I know I can use sleep functions but that runs th...
by GerardWassink
Wed Nov 11, 2015 10:18 am
Forum: Networking and servers
Topic: Server only works on my home network?
Replies: 13
Views: 2630

Re: Server only works on my home network?

For info on port forwarding on your router, click here. Be sure to repeat the process for port 443 when you want to allow HTTPS traffic.
by GerardWassink
Tue Nov 10, 2015 12:02 pm
Forum: Beginners
Topic: Lost login and password
Replies: 14
Views: 7055

Re: Lost login and password

gordon77 wrote:I am never sure if it's a good idea you can easily recover / change the password on a system .
It's not.
by GerardWassink
Fri Oct 30, 2015 10:38 am
Forum: C/C++
Topic: C Libraries for Adafruit servo HAT?
Replies: 9
Views: 2236

Re: C Libraries for Adafruit servo HAT?

Hi Gerard, Did you manage to port the python library to C? Can you give us some feedbacks about your work? Best regards, I decided not to port. I switched to python (having to learn this language first). The result can be found here . The code incorporates the ability to work with the Adafruit serv...
by GerardWassink
Mon Oct 26, 2015 1:21 pm
Forum: Beginners
Topic: Keyboard setup difficulties
Replies: 6
Views: 2226

Re: Keyboard setup difficulties

RayDious wrote: Is there anything else that might be worth trying? Thanks.
Try US-American. What you are describing, AFAICT, is the difference between English and American keyboards.

HTH,
Gerard
by GerardWassink
Sun Oct 25, 2015 8:41 am
Forum: C/C++
Topic: C++
Replies: 28
Views: 5877

Re: C++

Final update: ... If anyone can suggest a good tutorial on using C to help me make sense of all this I'd be most grateful. An entry level tutorial can easily be found I guess, as mentioned earlier in this thread. When I want to know something, I always return to the famous book " The C program...
by GerardWassink
Wed Oct 14, 2015 4:53 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

Found an explanation for the 0x70 address in this thread on the Adafruit forum : This is normal for this chip. In addition to the regular addressing which starts at 0x40, there is an "All Call" address at 0x70 for addressing all PCA9685 devices simultaneously. See section 7.1.2 of the data...
by GerardWassink
Wed Oct 14, 2015 4:32 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

Adding some information: when I plugged in the Adafruit 16 Servo HAT, all of a sudden there where two I2C addresses present whenI did i2cdetect -y 1 being 0x40, that I expected, because it is it's base address and I didn't set jumpers. The second address is 0x70, which also popped up. Could that be ...
by GerardWassink
Wed Oct 14, 2015 3:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

Which is not following the HAT specification (and why I thought at first that it didn't have an ID EEPROM). This violation of the SPEC is of no real consequence, if Adafruit HATs are able to stack with each other then that is a nice bonus, and yet another reason to buy Adafruit products. Unfortunat...
by GerardWassink
Wed Oct 14, 2015 2:58 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

PiGraham wrote:HATS are not designed o be stacked.
I beg to differ. Quote from this Adafruit page:
What's more, you can stack up to 62 of them to control up to 992 servos
.
by GerardWassink
Wed Oct 14, 2015 2:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

Just for my information and curiosity: what does such an ID EEPROM do?

[edit]
Oops, never mind, found it... [blushes]
by GerardWassink
Wed Oct 14, 2015 7:13 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

The only thing I see when both Sense and Motor Hat are connected - is on Row 60 - There are two addresses one at col "0" - x60 and col "a" - x6a which look like different addresses to me? Is this considered a conflict? No it is not. This is a space-saving way to represent a larg...
by GerardWassink
Tue Oct 13, 2015 5:05 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

My process of development (not quite finished yet) can be followed at my youtube channel.
Film 56 shows my attempts while I was still working with transistors.
Film 57 shows the ULN2803 relay drivers.
Film 58 shows the first prototype decoder/driver board.
by GerardWassink
Tue Oct 13, 2015 3:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

I'd say it qualifies as "stacking" it just doesn't technically qualify as a HAT (neither does the Adafruit Motor HAT) as it doesn't have an ID EEPROM. That's true... I didn't make that distinction. I have seen other i2c based 16 channel relay boards (but they are hard to find), it's a con...
by GerardWassink
Tue Oct 13, 2015 3:04 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

I am currently developing a 16 relay I2C board based on the MCP23017 chip and two ULN2308's. See the doc library for spec's of those parts. I know, it's probably been done dozens of times, but I wanted to try anyway. For this project, the decoder/driver board is fed using a 5Volt PSU. I only connect...
by GerardWassink
Tue Oct 13, 2015 2:05 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

As far as I know, the Adafruit servo HAT is stackable. They state one can stack up to 62 of them, theoretically. That's why I presumed it is possible.
by GerardWassink
Tue Oct 13, 2015 1:18 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi support for different simultaneous HATs over i2c?
Replies: 53
Views: 10295

Re: Pi support for different simultaneous HATs over i2c?

Using different kinds of HAT's should not be any problem as long as they do not use the same I2C addresses. Does the sense HAT not need an external power supply?

Go to advanced search