Go to advanced search

by deepo
Wed Jun 26, 2019 9:05 pm
Forum: General discussion
Topic: Posture Sensor
Replies: 3
Views: 403

Re: Posture Sensor

I would go for a pulse sensor like those found in many smart watches. The type that shines a light into your skin and detects your pulse. By analyzing data from the sensor you can tell for how long time the pulse is high. That may give you an indication of activity. Maybe in combination with a GPS y...
by deepo
Wed Jun 26, 2019 8:34 pm
Forum: C/C++
Topic: [Serial port] The 'read()' will read 8 bytes blocks only
Replies: 26
Views: 9049

Re: [Serial port] The 'read()' will read 8 bytes blocks only

Serial communication does not give any guarantee that you will receive what's being sent as a whole telegram, as you expect. I think you need to follow some kind of protocol, if you need to split the serial data stream into telegrams. A very simple protocol could be STX/ETX, i.e. ASCII character 2 (...
by deepo
Wed Jun 26, 2019 8:02 pm
Forum: General discussion
Topic: My project with raspberry
Replies: 5
Views: 419

Re: My project with raspberry

W. H. Heydt wrote:
Tue Jun 25, 2019 11:34 pm
C# has, as I understand it, proprietary extensions from Microsoft (part of their "4X" practices). You should consider C or C++.
C# can (with some restrictions) run on Linux:
https://www.mono-project.com/

/Mogens
by deepo
Fri Jun 21, 2019 5:03 pm
Forum: General discussion
Topic: My Raspberry Home Server
Replies: 7
Views: 784

Re: My Raspberry Home Server

Besides fail2ban I'd like to give a shout out to UFW Uncomplicated Firewall. Really easy to setup. Here are some of the commands you'll need to use: sudo apt-get install ufw sudo ufw disable sudo ufw enable sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow from 192.168.0....
by deepo
Thu Jun 20, 2019 9:14 pm
Forum: General discussion
Topic: Getting IP from headless RPi
Replies: 30
Views: 3080

Re: Getting IP from headless RPi

Just as a proof of concept, this code works to set up a BLE service on the Pi with one characteristic providing the Pi's IP address. Advantages: should work from any modern Android or iPhone. Disadvantages: many, but it's a little more modern than Morse code. You'll need to grab the imports from my...
by deepo
Thu Jun 20, 2019 7:33 am
Forum: General discussion
Topic: Anrdriod Screen mirroring/casting
Replies: 1
Views: 236

Re: Anrdriod Screen mirroring/casting

There are a ton of webpages describing how to turn your RPi into a Chromecast thingie. Maybe you should give them a go, since you already have the RPi Zero. https://thepi.io/how-to-use-your-raspberry-pi-as-a-chromecast-alternative/ I don't have an Android phone, so I can't tell you whether it will w...
by deepo
Thu Jun 13, 2019 9:05 pm
Forum: Beginners
Topic: Anyone run MySQL on a RPi 3+?
Replies: 8
Views: 789

Re: Anyone run MySQL on a RPi 3+?

I just installed MariaDB on my RPi 3B+ running Raspbian Lite.

All you have to do is:

Code: Select all

sudo apt-get install mariadb-server
You can then log in:

Code: Select all

sudo mysql -u root -p -h localhost
There is no password, so just press enter.

/Mogens
by deepo
Thu Jun 13, 2019 8:50 pm
Forum: General discussion
Topic: simple html <button> execute aplay
Replies: 2
Views: 311

Re: simple html <button> execute aplay

Maybe this guide can inspire you:
https://www.element14.com/community/com ... age-reboot

You should be able to replace the reboot action to playing your sound file.

/Mogens
by deepo
Thu Jun 13, 2019 7:50 pm
Forum: General discussion
Topic: Enable SSH when creating SD card
Replies: 19
Views: 93096

Re: Enable SSH when creating SD card

Hi I use raspbian version april 2019, and you can create a folder ssh in boot and take SD card to Pi. You can't create before write .img to SD card. :)) Good night Actually you can, but it involves a lot of mounting, unpacking, partition operations i.e. bash gymnastics :) But it is possible to crea...
by deepo
Thu Jun 13, 2019 7:27 pm
Forum: C/C++
Topic: Programming bluetooth using C++
Replies: 16
Views: 9909

Re: Programming bluetooth using C++

I stumbled upon TinyB from Intel: TinyB exposes the BLE GATT API for C++, Java and other languages, using BlueZ over DBus. https://github.com/intel-iot-devkit/tinyb I was able to discover Bluetooth devices, listing their services etc. But it does not seem to allow me to receive BLE advertisements, s...
by deepo
Fri May 31, 2019 8:25 am
Forum: C/C++
Topic: Programming bluetooth using C++
Replies: 16
Views: 9909

Re: Programming bluetooth using C++

AnneRanch: You should be able to fix the missing file problem by editing the file that includes the missing file as robot: sudo nano filename.ext But your build might still be broken after that. I think I updated BlueZ to 5.5 but I don’t have my notes here. I’ll respond when I get back home monday. ...
by deepo
Thu May 30, 2019 7:33 am
Forum: C/C++
Topic: Programming bluetooth using C++
Replies: 16
Views: 9909

Re: Programming bluetooth using C++

AnneRanch, I understand your frustration. I'm there myself. My latest Bluetooth "project" was installing SBFspot this week on a rPi Zero W to transfer data via Bluetooth from my solar cells on the roof to pvoutput.org. https://github.com/SBFspot/SBFspot I haven't looked into the code yet, but it wor...
by deepo
Wed May 29, 2019 9:59 pm
Forum: C/C++
Topic: printf issue on raspbian
Replies: 9
Views: 2320

Re: printf issue on raspbian

Your while loop does not contain any code to release the CPU for other purposes, such as flushing stdout.
Maybe adding a small pause will help?
Look at this post for short sleeps: viewtopic.php?t=80705

/Mogens
by deepo
Wed May 29, 2019 8:50 pm
Forum: C/C++
Topic: Programming bluetooth using C++
Replies: 16
Views: 9909

Re: Programming bluetooth using C++

Oh by the way.
I have never had to start the Bluetooth stack in any way, when working with Bluez on rPi 3B+.
My code (similar to your example) just connected and worked out of the box.

/Mogens
by deepo
Wed May 29, 2019 8:48 pm
Forum: C/C++
Topic: Programming bluetooth using C++
Replies: 16
Views: 9909

Re: Programming bluetooth using C++

I have also tried to get Bluetooth communication code working from C++ - with varied success. My goal is to intercept Bluetooth Low Energy (BLE) Advertisement messages, similar to Bluetooth beacon signals. I have managed that using the Bluez Bluetooth stack. My goal was to receive temperature measur...
by deepo
Fri May 03, 2019 8:53 pm
Forum: C/C++
Topic: Help with Bluetooth and BlueZ D-Bus from C++
Replies: 0
Views: 1391

Help with Bluetooth and BlueZ D-Bus from C++

I'm trying to work with the code I found on stack overflow topic Basic BLE client with D-Bus BlueZ . The first part of the code scans for BLE advertisement messages. It works fine, and I am able to read and decode temperature and humidity measurements from an Minew S1 Bluetooth device. So I have cut...
by deepo
Fri Feb 08, 2019 6:43 pm
Forum: Graphics, sound and multimedia
Topic: Help with 16 step sequencer
Replies: 1
Views: 292

Re: Help with 16 step sequencer

I found this link, which explains how to have your Raspberry Pi send key presses to your computer: https://randomnerdtutorials.com/raspberry-pi-zero-usb-keyboard-hid/ Hooking up your 10 buttons shouldn't be a problem. There are tons of guides on how to do that. Like this one: https://raspberrypihq.c...
by deepo
Thu Jan 17, 2019 12:39 pm
Forum: Graphics, sound and multimedia
Topic: Cam streaming RPi Zero to Chromecast possible?
Replies: 8
Views: 2575

Re: Cam streaming RPi Zero to Chromecast possible?

It should be possible to cast to a Chromecast without Chromium: https://github.com/balloob/pychromecast It used to be possible but it's not so easy these days as the protocols Chromecast uses have changed. That particular project I believe uses SSDP/DIAL protocols and the Chromecast no longer appea...
by deepo
Thu Jan 17, 2019 10:37 am
Forum: Graphics, sound and multimedia
Topic: Cam streaming RPi Zero to Chromecast possible?
Replies: 8
Views: 2575

Re: Cam streaming RPi Zero to Chromecast possible?

I'm a member of a rifle shooting club, where we used to mount an old VHS video camera close to the paper target to film the impacts. We did this to save us a lot of walking back and forth to check target hits. The VHS video camera had a TV modulator output which output a signal that we could see on...
by deepo
Wed Jan 16, 2019 7:43 pm
Forum: Graphics, sound and multimedia
Topic: Cam streaming RPi Zero to Chromecast possible?
Replies: 8
Views: 2575

Cam streaming RPi Zero to Chromecast possible?

I'm a member of a rifle shooting club, where we used to mount an old VHS video camera close to the paper target to film the impacts. We did this to save us a lot of walking back and forth to check target hits. The VHS video camera had a TV modulator output which output a signal that we could see on ...
by deepo
Sun Dec 30, 2018 8:47 pm
Forum: General discussion
Topic: Show us your Pi Pressies
Replies: 7
Views: 1149

Re: Show us your Pi Pressies

I got a RPi 3B+, a PSU and a Flirc case.
It's my fourth RPi, the third in a Flirc case. The last one is in a HiFiBerry case with a Digi+ hat.
I needed another RPi for new projects :)

/Mogens

Go to advanced search