Go to advanced search

by CFLanger
Wed May 29, 2019 3:14 pm
Forum: Advanced users
Topic: Need help with GPS and IOT.
Replies: 3
Views: 405

Re: Need help with GPS and IOT.

you might need this. It should be accurate enough // ///////////////////////////////////////////////////////////////////////////////////////////////////////// // // // Determine the distance in miles from one pair to another // // // // Description: // // Arguments: // // Returns: // // // // Notes/...
by CFLanger
Wed Mar 13, 2019 8:12 pm
Forum: C/C++
Topic: C programming project work
Replies: 2
Views: 555

Re: C programming project work

by CFLanger
Wed Dec 05, 2018 6:14 pm
Forum: C/C++
Topic: XML parse of openweathermap with libxml2 in C
Replies: 1
Views: 1065

XML parse of openweathermap with libxml2 in C

Does anybody have solid C source to parse the openweathermap XML data that they want to share?
by CFLanger
Sun Nov 25, 2018 3:41 pm
Forum: Automation, sensing and robotics
Topic: Introducing Pisces!
Replies: 0
Views: 1051

Introducing Pisces!

A Raspberry Pi based GPS/NAV computer built around an Adafruit GPS module and LSM303 Magnetometer/Accelerator module.

https://youtu.be/zcfVZphEbgc
by CFLanger
Tue Aug 14, 2018 8:21 pm
Forum: Automation, sensing and robotics
Topic: Water sensor for a (deep) well
Replies: 3
Views: 745

Re: Water sensor for a (deep) well

guided wire radar.
by CFLanger
Wed May 30, 2018 4:00 pm
Forum: Automation, sensing and robotics
Topic: Using two analog potentiometers to enter two digits
Replies: 11
Views: 1058

Re: Using two analog potentiometers to enter two digits

How about push thumb wheel switches? Stack 2 together, BCD output with a few GPIOs
digi has them
https://www.digikey.com/product-detail/ ... -ND/368288
by CFLanger
Thu May 17, 2018 3:41 pm
Forum: Advanced users
Topic: Trouble getting modbus over RS485 connecting to GPIO
Replies: 5
Views: 1664

Re: Trouble getting modbus over RS485 connecting to GPIO

these just work!

http://www.ftdichip.com/Products/Cables/USBRS485.htm

I used 2 of these to connect a Pi2 to a Allen Bradley PLC using MODBUS AT 19200
If I remember I didnt even have to muck around with a driver.

They also have a clear body so you can see the cool LEDs blinking!
by CFLanger
Wed May 16, 2018 6:05 pm
Forum: Automation, sensing and robotics
Topic: Simple communication between RPi and PLC
Replies: 4
Views: 2435

Re: Simple communication between RPi and PLC

you need to implement MODBUS RTU. Code a modbus slave thread on the pi using libmodbus. The PLC ladder logic programming can easily add a modbus master to poll the Pi for a single register with the setting u want to transfer.
by CFLanger
Wed May 16, 2018 5:58 pm
Forum: Automation, sensing and robotics
Topic: profibus on Raspberry pi
Replies: 8
Views: 5148

Re: profibus on Raspberry pi

are you making a slave device or a master? If a master, good luck. I implemented a Profibus DP slave using an off the shelf SOC that implements the profibus layers 1 and 2. The chip is VPC3 from procentec. This chip would be easy to connect to a raspberry spi I2C or SPI channel. It has a data link p...
by CFLanger
Wed May 16, 2018 5:44 pm
Forum: Advanced users
Topic: Trouble getting modbus over RS485 connecting to GPIO
Replies: 5
Views: 1664

Re: Trouble getting modbus over RS485 connecting to GPIO

There are converters that take in 2 wire RS-232 and converts it to 2 wire RS-485 with "auto RTS control" Use one of those instead of attempting to do your own turn around control for half duplex communication. Google B&B
by CFLanger
Thu Apr 12, 2018 7:53 pm
Forum: General discussion
Topic: 4-20mA output
Replies: 16
Views: 6048

Re: 4-20mA output

look at AD5421.
by CFLanger
Mon Apr 09, 2018 3:28 pm
Forum: C/C++
Topic: Does anyone have the SPI C code for ADXL345 to share?
Replies: 15
Views: 2525

Re: Does anyone have the SPI C code for ADXL345 to share?

when you get data coming out you have to calibrate it.
https://youtu.be/AHj_KB260eM
by CFLanger
Fri Jan 12, 2018 9:03 pm
Forum: Advanced users
Topic: GPS logging and interfacing on map overlay
Replies: 4
Views: 1594

Re: GPS logging and interfacing on map overlay

I think I did what your trying to do in this project of mine.

Link for code is in description on YT

https://www.youtube.com/watch?v=x0_hE_R2ms8
by CFLanger
Mon Oct 09, 2017 6:55 pm
Forum: Advanced users
Topic: 3 GHz sine wave using raspberry pi
Replies: 7
Views: 1886

Re: 3 GHz sine wave using raspberry pi

Use a fractional (or integer) n pll synthesizer
Today TI and infinion have single chip solutions with integrated VCO's
Radar in automotive market are spurring this devices
Connect the PI's SPI BUS and provide a reference clock.
by CFLanger
Mon Feb 06, 2017 12:52 pm
Forum: General discussion
Topic: modbus woes
Replies: 2
Views: 1038

Re: modbus woes

Check out my example. Hope this helps // ///////////////////////////////////////////////////////////////////////////////////////////////////////// // // // Raspberry Pi3 Simple Modbus Master // // // // // // File : mb_master.c // // Programmer : Chris Langer // // // ///////////////////////////////...
by CFLanger
Mon Dec 19, 2016 7:10 pm
Forum: Advanced users
Topic: How to check if USB keyboard detected?
Replies: 2
Views: 978

Re: How to check if USB keyboard detected?

// Check for attached USB external keyboard kbdpresent = FALSE; dir = opendir(path); if( dir != NULL ) { while((dirent = readdir(dir) )) { if(dirent->d_type == DT_LNK && strstr(dirent->d_name, "-event-kbd") != NULL ) { strcpy(fname, dirent->d_name); gtk_label_set_text( (GtkLabel *)label6, "USB Keyb...
by CFLanger
Tue Dec 13, 2016 7:09 pm
Forum: General discussion
Topic: Number of samples in FFT
Replies: 22
Views: 3518

Re: Number of samples in FFT

google ping pong buffering, or circular buffers.

https://gist.github.com/anonymous/1a9c5 ... d73f27d6c0
by CFLanger
Tue Dec 06, 2016 2:23 pm
Forum: General discussion
Topic: Disabling Cut/Copy/Paste on touch screen
Replies: 2
Views: 617

Re: Disabling Cut/Copy/Paste on touch screen

Yes, I believe that's what I want. I use the stylus to set focus and the keyboard to edit. Just by setting focus with a quick touch to a GTK entry box causes them to appear. If I touch another box another appears etc ...
by CFLanger
Tue Dec 06, 2016 2:19 pm
Forum: General discussion
Topic: Disabling Cut/Copy/Paste on touch screen
Replies: 2
Views: 617

Disabling Cut/Copy/Paste on touch screen

Does anybody know how to disable the cut/copy/paste ticks and popups on the official raspberry pi display?
The project is running latest Jessie on a Pi2. :?


Regards Chris
by CFLanger
Tue Nov 29, 2016 9:55 pm
Forum: General discussion
Topic: Real time sound analysis with FFT
Replies: 4
Views: 5124

Re: Real time sound analysis with FFT

I used an MSP430 processor to do the audio sampling. As it turned out the I2C clock freq determined the sampling rate.

https://youtu.be/j7w5Jvs-VsY
by CFLanger
Tue Nov 29, 2016 5:06 pm
Forum: General discussion
Topic: Install the libmodbus library and compile programs with
Replies: 2
Views: 5593

Re: Install the libmodbus library and compile programs with

will this help? It's my makefile for my project using libmodbus installed per the instructions # # Solid Makefile # CC = gcc CFLAGS = -c -Wall LDFLAGS = -rdynamic -lrt -lm -ldl -lpthread INC = -I/usr/include/modbus # List of sources: SOURCES = ab_client.c OBJECTS = $(SOURCES:.c=.o) # Name of executa...
by CFLanger
Thu Nov 17, 2016 4:48 pm
Forum: General discussion
Topic: Rasperry pi 2 as modbus master
Replies: 2
Views: 2661

Re: Rasperry pi 2 as modbus master

Google libmodbus. This package works very well. It supports master and slave RTU as well MODBUS over TCP. You will need to know the MODBUS address map of the variables you wish to query from the meters. FTDI makes neat USB to RS485 converters that implement auto RTS for half duplex twisted pair netw...
by CFLanger
Sat Nov 05, 2016 9:28 pm
Forum: General discussion
Topic: ALT key stuck in Florence
Replies: 8
Views: 1887

Re: ALT key stuck in Florence

Even after pulling in all the dependencies to rebuild Florence to the next revision it still misbehaved. I moved on to using the XVK keyboard. Finally, I didn't expect anyone to post a reply within that short of a time after posting. My comment to myself was basically due to frustration.

Go to advanced search