Go to advanced search

by buja
Sun Oct 21, 2018 4:33 pm
Forum: Python
Topic: BMP280, testers needed
Replies: 18
Views: 197

Re: BMP280, testers needed

Thanks! That "BMP280 returned 0 instead of 88. Expect problems." tells me that my driver don't see bmp280. What gpio did you use? It has to be somewhere "free", so GPIO can simulate SPI. I2C doesn't work yet. The degree sign issue is strange. What error did you get? python measure.py~ File "measure...
by buja
Sun Oct 21, 2018 4:20 pm
Forum: Python
Topic: BMP280, testers needed
Replies: 18
Views: 197

Re: BMP280, testers needed

Could it be that Dougie's way does not work because in the Python setup the sensor is connected via SPI, and not I2C?
by buja
Sun Oct 21, 2018 4:16 pm
Forum: Python
Topic: BMP280, testers needed
Replies: 18
Views: 197

Re: BMP280, testers needed

Useful info from Dougie, but I tried the Python program anyway. First issue: get rid of the degree sign, my Pi did not like it. Second issue: it's not going well, see below. python measure.py BMP280 returned 0 instead of 88. Expect problems. /home/wwx/bmp280-master/bmp280.py:290: RuntimeWarning: ove...
by buja
Sat Oct 20, 2018 5:43 am
Forum: Python
Topic: Must be a simple answer to this keyboard input problem
Replies: 3
Views: 110

Re: Must be a simple answer to this keyboard input problem

This runs okay in Python3, but gives the error in Python2.

For Python2 this should do it:

Code: Select all

print fn,"is user", usr
by buja
Tue Oct 16, 2018 3:38 pm
Forum: C/C++
Topic: I am missing some fundamental understanding of C?
Replies: 13
Views: 335

Re: I am missing some fundamental understanding of C?

What does this mean?

Code: Select all

lfb.putpixel(x+test.xoffset,y+test.yoffset,test.data[x][y]);
putpixel looks like a function to me, with 3 arguments, but what does lfd.putpixel() mean? (I don't understand the dot notation here)
by buja
Fri Oct 12, 2018 4:12 pm
Forum: General discussion
Topic: How can you prove raspberry pi 3B+ is suitable for industrial and stamping factory environment?
Replies: 11
Views: 363

Re: How can you prove raspberry pi 3B+ is suitable for industrial and stamping factory environment?

Saw this interesting unit while doing some browsing on Amazon for some in my Christmas shopping list...... This quite an interesting thing if you are looking for industrial applications. Amazon UK is a bit light on information on this, but this link seems to be the manufacturer: https://revolution....
by buja
Mon Oct 08, 2018 5:32 pm
Forum: Python
Topic: Run code on the top of the hour
Replies: 7
Views: 151

Re: Run code on the top of the hour

I don't understand you problem with cron, but I think with cron you would already be done with the job.
by buja
Sun Oct 07, 2018 2:28 pm
Forum: Beginners
Topic: How to I2C in C ?
Replies: 4
Views: 139

Re: How to I2C in C ?

There are several possibilities to use the I2C port in C. I used this information: http://www.raspberry-projects.com/pi/programming-in-c/i2c/using-the-i2c-interface You can also use the GPIO libraries, they have I2C functions built-in. With the GPIO libraries I mean wiringPi (pre-installed on Raspbi...
by buja
Mon Oct 01, 2018 6:23 pm
Forum: Other programming languages
Topic: A compilable basic that uses line numbers for Pi?
Replies: 53
Views: 2101

Re: A compilable basic that uses line numbers for Pi?

Those silly commands come from a time when it made perfect sense to be as short as possible because people used teletype terminals and slow serial connections (75 bits per second or so). Those days are gone, but we still have to deal with this legacy. And frankly, the handful of commands Heater list...
by buja
Thu Sep 27, 2018 7:05 pm
Forum: C/C++
Topic: can not use wiringPi with code blocks
Replies: 3
Views: 214

Re: can not use wiringPi with code blocks

In the terminal commands you switch the LED on and off, but in your program you only switch it on.
So all you need to do is add an instruction to switch the LED off, just like you do on the command line.
by buja
Sun Sep 09, 2018 4:59 pm
Forum: General discussion
Topic: VNC printing ---where is it?
Replies: 13
Views: 503

Re: VNC printing ---where is it?

@scruss: thanks, that did it!
Both options were checked. I unchecked them, checked them again and Applied to be sure the setting was saved, and now it works, I can print from my Pi :)
by buja
Sun Sep 09, 2018 9:55 am
Forum: General discussion
Topic: VNC printing ---where is it?
Replies: 13
Views: 503

Re: VNC printing ---where is it?

DirkS wrote:
Sun Sep 09, 2018 9:49 am
buja wrote:
Sun Sep 09, 2018 9:17 am
but I am puzzled where to set the device URI. Maybe you can help?
Why do you need to set that?
Because of the error message in Jobs overview: "Unable to locate printer "elite.local".
by buja
Sun Sep 09, 2018 9:17 am
Forum: General discussion
Topic: VNC printing ---where is it?
Replies: 13
Views: 503

Re: VNC printing ---where is it?

@picandies: there is no print option in VNC Viewer. The text you mention refers to the print option in the program you are using on your Pi via VNC Viewer, for example a text editor or GIMP, like scruss shows. I agree the text could be more clear about that. Printing from the Pi on a local printer c...
by buja
Thu Sep 06, 2018 10:40 am
Forum: C/C++
Topic: we are trying to use gpio pin as chip select
Replies: 24
Views: 1054

Re: we are trying to use gpio pin as chip select

You have to run you program with superuser privileges.
If your program is called Blinky, try to run it like this:

Code: Select all

sudo ./Blinky
by buja
Tue Sep 04, 2018 6:18 am
Forum: C/C++
Topic: we are trying to use gpio pin as chip select
Replies: 24
Views: 1054

Re: we are trying to use gpio pin as chip select

It could be as easy as this: 1. Menu Build / Set Build Commands The line Build will show something like this: gcc -Wall -o "%e" "%f" -lm 2. Add -lbcm2835 to this line: gcc -Wall -o "%e" "%f" -lm -lbcm2835 3. Build the program again Of course you should have installed the bcm2835 library correctly in...
by buja
Mon Sep 03, 2018 12:59 pm
Forum: C/C++
Topic: we are trying to use gpio pin as chip select
Replies: 24
Views: 1054

Re: we are trying to use gpio pin as chip select

You need to include the bcm2825 library in your build command: -lbcm2835
(I don't have Geany available right now, so I cannot be more specific at the moment).
by buja
Sun Aug 26, 2018 9:11 pm
Forum: Java
Topic: Pi4J Version 1.1 is Released!
Replies: 3
Views: 1190

Re: Pi4J Version 1.1 is Released!

Other users here may have a solution, but it's probably best to contact the author directly via the Google group: http://www.savagehomeautomation.com/contact/
by buja
Sat Aug 25, 2018 5:23 am
Forum: Beginners
Topic: Can I attach this motor directly to gpio safely?
Replies: 4
Views: 266

Re: Can I attach this motor directly to gpio safely?

No, you should not connect the motor directly to the GPIO's.
The motor will draw too much current and that will destroy the Pi.
It's not even a risk, it is a certainty.
by buja
Sun Aug 19, 2018 9:26 pm
Forum: Beginners
Topic: Unable to fetch some archives
Replies: 7
Views: 255

Re: Unable to fetch some archives

I have the same problem the last couple of days.
Trying again later seems to work. How much later? Can be minutes or the next day.
by buja
Mon Aug 13, 2018 6:07 pm
Forum: Automation, sensing and robotics
Topic: Calculate distance traveled with a variable time and speed (Odometer)
Replies: 20
Views: 582

Re: Calculate distance traveled with a variable time and speed

A simple way of doing this is to measure the speed at fixed intervals, every 5 seconds for example. Multiply the speed by the duration and you have to distance traveled during that interval. Add that interval distance to the total and you have the total distance. I assume the speed is constant durin...
by buja
Tue Jun 12, 2018 11:08 am
Forum: C/C++
Topic: Using Hex value in a Calculation
Replies: 3
Views: 401

Re: Using Hex value in a Calculation

If you already have a number as an integer (int), there is no need to convert between decimal and hexadecimal. The only thing you have to do is decide in which format you want to print the number: int a = 0x10; printf("%02x", a); => this prints 10 printf("%02d", a); => this prints 16 The numerical v...
by buja
Thu Mar 29, 2018 5:07 am
Forum: Raspbian
Topic: Raspian on non Raspberry systems...
Replies: 2
Views: 264

Re: Raspian on non Raspberry systems...

So, then, given that Raspian isn't affiliated with the Raspberry Pi Foundation, where IS the proper place to discuss Raspian on non-Raspberry Pi systems? The proper place to discuss Raspbian on non-Raspberry Pi systems is the relevant non-Raspberry Pi forum, the Banana Pi or Orange Pi forum for ins...
by buja
Fri Mar 16, 2018 8:28 am
Forum: Off topic discussion
Topic: Stephen Hawking RIP
Replies: 18
Views: 4062

Re: Stephen Hawking RIP

... It gets worse. Turns out the maximum amount of information you can put into any given volume of space, say your living room, is proportional to its surface area not it's volume. Try to put more in and your living room becomes a black hole! If I translate "information" to "stuff" the analogy bec...
by buja
Sun Feb 04, 2018 5:11 pm
Forum: Troubleshooting
Topic: Libre Calc Crashing on Pi-Zero
Replies: 7
Views: 565

Re: Libre Calc Crashing on Pi-Zero

Is going fully command-line an option? For the spreadsheet you could use SC, a text mode spreadsheet that can be easily installed through apt. Or maybe even better in this case: SC-IM (https://github.com/andmarti1424/sc-im). I haven't used that myself, but it's an improved version of SC, and one of ...

Go to advanced search