## Search found 447 matches

Go to advanced search

Mon Aug 13, 2018 6:07 pm
Forum: Automation, sensing and robotics
Topic: Calculate distance traveled with a variable time and speed
Replies: 3
Views: 80

### 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...
Tue Jun 12, 2018 11:08 am
Forum: C/C++
Topic: Using Hex value in a Calculation
Replies: 3
Views: 342

### 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...
Thu Mar 29, 2018 5:07 am
Forum: Raspbian
Topic: Raspian on non Raspberry systems...
Replies: 2
Views: 239

### 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...
Fri Mar 16, 2018 8:28 am
Forum: Off topic discussion
Topic: Stephen Hawking RIP
Replies: 18
Views: 3955

### 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...
Sun Feb 04, 2018 5:11 pm
Forum: Troubleshooting
Topic: Libre Calc Crashing on Pi-Zero
Replies: 7
Views: 517

### 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 ...
Sat Jan 13, 2018 7:49 am
Forum: Beginners
Topic: Autorun terminal commands at boot
Replies: 2
Views: 348

### Re: Autorun terminal commands at boot

Thu Jan 11, 2018 5:14 pm
Forum: C/C++
Topic: Timer that counts more than a second
Replies: 7
Views: 735

### Re: Timer that counts more than a second

Double.
Thu Jan 11, 2018 5:13 pm
Forum: C/C++
Topic: Timer that counts more than a second
Replies: 7
Views: 735

### Re: Timer that counts more than a second

Seems to be a handy function, alarm(). I made an example program to find out how it works. /* alarm.c */ #include <stdio.h> #include <signal.h> #include <stdlib.h> #include <unistd.h> #define BUF_SIZE 200 static void handler(int sig) { printf("Caught signal\n"); /* UNSAFE - see Section 21.1.2) */ } ...
Wed Jan 10, 2018 4:34 pm
Forum: Wanted
Topic: WANTED: Conquer the Command Line - Richard Smedley
Replies: 6
Views: 1887

### Re: WANTED: Conquer the Command Line - Richard Smedley

The book is available at Amazon UK, but the price is quite high. https://www.amazon.co.uk/Conquer-Command-Line-Richard-Smedley/dp/1908256850/ref=pd_rhf_gw_p_img_5?_encoding=UTF8&psc=1&refRID=7F6BQANDNQYBMC8T0664 Don't forget, soon after releasing this book, Raspbian went from Wheezy to Stretch, maki...
Fri Dec 22, 2017 6:51 pm
Forum: C/C++
Topic: stretch wiringpi
Replies: 24
Views: 2252

### Re: stretch wiringpi

wiringPi comes with Raspbian, it is installed by default. You can check if it is there by asking APT (the package manager) and by checking the contents of the directory with the system libraries. [email protected]:~/wiringpi \$ apt search wiringpi Sorting... Done Full Text Search... Done wiringpi/stable,now 2....
Fri Dec 22, 2017 6:09 pm
Forum: C/C++
Topic: stretch wiringpi
Replies: 24
Views: 2252

### Re: stretch wiringpi

I think you have to make a choice between the wiringPi from Github and the wiringPi that comes standard with Raspbian.
Choose one, delete the other.
Fri Dec 22, 2017 1:21 pm
Forum: C/C++
Topic: stretch wiringpi
Replies: 24
Views: 2252

### Re: stretch wiringpi

Maybe -lwiringPiDev?
(I came up with this after a quick look in Synaptic to check the installed files)
Wed Dec 20, 2017 9:09 am
Forum: Troubleshooting
Topic: Execute a python file from Gammu
Replies: 4
Views: 299

### Re: Execute a python file from Gammu

The shebang line should go in the python file.
I would keep the .py extension, makes it more clear. You don't need a separate .sh file.
Wed Dec 20, 2017 5:22 am
Forum: Troubleshooting
Topic: Execute a python file from Gammu
Replies: 4
Views: 299

### Re: Execute a python file from Gammu

Does your Python script start with the so called shebang? Example 1: without shebang line. # example1.py print('Run this with the python command') To run example 1 you must give this command: python3 example1.py Example 2: with shebang line, you run this without specifying the Python interpreter on ...
Mon Dec 18, 2017 6:42 pm
Forum: General discussion
Topic: micro sd keeps becoming corrupt
Replies: 6
Views: 580

### Re: micro sd keeps becoming corrupt

It's certainly not normal that (new) SD cards fail often.

I guess the first thing to look at is the power supply. Do you often see lightning bolts on the screen (they indicate low voltage)?
Power failures may damage your SD card.
For a Pi 3 a 2.5 A power supply is recommended.
Wed Dec 13, 2017 11:51 am
Forum: Python
Topic: SDS021 sleep/wake with python
Replies: 3
Views: 746

### Re: SDS021 sleep/wake with python

I hope to receive my SDS021 soon, I am surprised the datasheet does not mention how to go to sleep mode. Maybe is the same as the SDS011 sensor for which I found this datasheet: https://www.google.nl/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0ahUKEwij4azO9YbYAhUCI1AKHRdfA0IQFgg3MAI...
Mon Dec 11, 2017 7:53 pm
Forum: General discussion
Topic: Help! - I need to launch LXTerminal at startup on the desktop.
Replies: 6
Views: 1779

### Re: Help! - I need to launch LXTerminal at startup on the desktop.

To launch LXTerminal at startup on the desktop you must add a line to the autostart file, which is in your personal configuration directory. nano ~/.config/lxsession/LXDE-pi/autostart You should see a couple of lines starting with @, add a line with 'x-terminal-emulator': @lxpanel --profile LXDE-pi ...
Fri Dec 08, 2017 11:38 am
Forum: C/C++
Topic: how to update or reinstall wiringPi of either prior installation source
Replies: 33
Views: 3051

### Re: how to update or reinstall wiringPi of either prior installation source

I understand what you mean, but you should not expect that. The examples you mention all have in common that they are easy to use as long as you stick to the use case the makers had in mind, the perfect regular consumer. This consumer should stay inside the box and use the package manager to install...
Fri Dec 08, 2017 10:03 am
Forum: C/C++
Topic: how to update or reinstall wiringPi of either prior installation source
Replies: 33
Views: 3051

### Re: how to update or reinstall wiringPi of either prior installation source

System stuff in system folders, user stuff in local folders. wiringPi is wiringPi (analogously similar programs and libs), so why have 2 different install root dirs and 1 extra in a home dir? But after all that wouldn't matter if there was a system GUI dashboard for overview and uninstall functions...
Sat Dec 02, 2017 9:27 am
Forum: C/C++
Topic: Undefined reference to main / Undefined reference to 'some_function'
Replies: 5
Views: 1088

### Re: Undefined reference to main / Undefined reference to 'some_function'

What happens if you give this command (fill in your own filenames here): gcc -o main main.c module.c This should produce an executable file with the main , which you can run. Building (=making an executable file) only main.c fails because it contains functions that are defined in module.c, and the c...
Fri Dec 01, 2017 7:05 pm
Forum: C/C++
Topic: A simple weather/environmental data collector in C
Replies: 10
Views: 1295

### Re: A simple weather/environmental data collector in C

Yeah, totally impossible to find something :?: Oh wait, I just ordered a BME 680 from Pimoroni (link: https://shop.pimoroni.com/products/bme680). The description has two links to Github sites, one with a Python library and one with a C library ;) (C library by Bosch, the manufacturer of the sensor)
Thu Nov 30, 2017 7:03 pm
Forum: Beginners
Topic: Connect to laptop
Replies: 5
Views: 542

### Re: Connect to laptop

If with "connect to laptop" you mean controlling the Pi from the laptop: yes that is possible. Here are some useful links: 1. https://www.raspberrypi.org/documentation/remote-access/ 2. https://www.raspberrypi.org/documentation/remote-access/vnc/README.md Link 2 is about VNC. In short: connect your ...
Thu Nov 30, 2017 7:17 am
Forum: C/C++
Topic: A simple weather/environmental data collector in C
Replies: 10
Views: 1295

### Re: A simple weather/environmental data collector in C

Interesting stuff! On your Github page on the CS811 sensor you mention it is not working flawlessly with the Raspberry Pi. The Pi Hut sells this sensor and on their website ( https://thepihut.com/products/adafruit-ccs811-air-quality-sensor-breakout-voc-and-eco2 ) they say: Finally, this chip (CS811)...
Wed Nov 29, 2017 9:09 pm
Forum: Beginners
Topic: pygame in geany (c) possible?
Replies: 4
Views: 399

### Re: pygame in geany (c) possible?

It's really simple (example in Python 2): # Just giving sensorValue some number to work with sensorValue = 105 voltage = sensorValue * 5.0 / 1023.0 print voltage # Or for Python 3: print(voltage) It's not that much different from C. By the way, Geany is just an editor, a nice editor with some handy ...
Wed Nov 29, 2017 6:09 pm
Forum: Raspbian
Topic: sudo apt-get update fails
Replies: 4
Views: 550

### Re: sudo apt-get update fails

Welcome

Go to advanced search