Go to advanced search

by Killertechno
Fri Dec 28, 2018 11:27 pm
Forum: C/C++
Topic: Little doubt on floating point precision
Replies: 7
Views: 1068

Re: Little doubt on floating point precision

Sorry, taking a look to Python code "a" is not an integer as I supposed but iy says <type 'numpy.ndarray'>.
by Killertechno
Fri Dec 28, 2018 11:14 pm
Forum: C/C++
Topic: Little doubt on floating point precision
Replies: 7
Views: 1068

Re: Little doubt on floating point precision

Here another example code: #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <dirent.h> #include <libgen.h> #include <math.h> #include <netinet/in.h> #include <sys/stat.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <s...
by Killertechno
Fri Dec 28, 2018 9:54 pm
Forum: C/C++
Topic: Little doubt on floating point precision
Replies: 7
Views: 1068

Little doubt on floating point precision

Hi to all, I'm porting Python code to C code and I have alittle doubt. On my Python code I have: a = 18781 b = 0.997649 c = a*b print("%f" % (c)) result is 18736.851729 while in C code: int a = 18781; float b = 0.997649; double c = 0.997649; printf("%f\r\n", a*b); printf("%f\r\n", (float)(a)*b); pri...
by Killertechno
Fri Dec 21, 2018 7:18 pm
Forum: Other programming languages
Topic: [newbie] How install npm?
Replies: 2
Views: 2711

[newbie] How install npm?

Hi to all, I know this cuold be a stupid question but I'm totally noob about this.... I have a server I can supply seismic data (Raspberry at 127.0.0.1), I want display realtime data on webpage following this example: http://www.seis.sc.edu/~crotwell/seisplotjs_demo/realtime/seedlink.html My target ...
by Killertechno
Thu Dec 20, 2018 11:25 am
Forum: C/C++
Topic: math problems in C
Replies: 12
Views: 3386

Re: math problems in C

Hi to all, not same trouble but I'm porting program from python too.... #define Gauss_sigma 0.025 #define Gauss_wiLength 2.0 #define SPS 100 double dT; unsigned int Gauss_smplLen; int main (void) { dT = 1.0/(double)SPS; // quanto di campionamento printf("Lunghezza finestra filtro %f campioni (double...
by Killertechno
Sun Dec 09, 2018 6:34 pm
Forum: Beginners
Topic: How to set time and date in boot time
Replies: 25
Views: 6722

Re: How to set time and date in boot time

Hi guys, may I ask where raspberry does save date at poweroff? I mean, where does raspberry read date after boot? I'm using latest raspbian, I set /etc/fake-hwclock.data file with dummy time (1th Jan 2000) and set it with read-only permissions. At boot I get time updated to 2016 without RTC and no n...
by Killertechno
Mon Dec 03, 2018 5:50 pm
Forum: Python
Topic: Run external command and get output
Replies: 1
Views: 1001

Run external command and get output

Hi to all, I am a noob in python and I need to run shell scripts. I've found some examples: #!/usr/bin/python import subprocess, sys cmd = "sudo /etc/init.d/ntp stop" p = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE) ## Talk with date command i.e. read data from stdout and stderr. Store ...
by Killertechno
Mon Dec 03, 2018 3:30 pm
Forum: Python
Topic: Periodically update DS3231 RTC with NTP
Replies: 11
Views: 1916

Re: Periodically update DS3231 RTC with NTP

Hi to all, I found this thread so I try to resume my old project due I'm confused about ntp sync and RTC on Raspberry pi..... I'm using one of latest Raspberry images (April or August 2018, I don't remember). In my application I use DS3231 (I need its PPS for external hardware) and I need to detect ...
by Killertechno
Fri Nov 30, 2018 8:55 am
Forum: Compute Module
Topic: WF111 wifi module on CM3
Replies: 3
Views: 2721

Re: WF111 wifi module on CM3

Hi, did you solve issues?
by Killertechno
Fri Nov 23, 2018 6:34 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: ENC28J60 SPI Ethernet
Replies: 33
Views: 53863

Re: ENC28J60 SPI Ethernet

What do you mean?
by Killertechno
Fri Nov 23, 2018 8:40 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: ENC28J60 SPI Ethernet
Replies: 33
Views: 53863

Re: ENC28J60 SPI Ethernet

All ethernet ports (eth0, eth2) goes to two router: same dhcp server configuration, just different networks. Working. Only ENC20J60 module not working at all.
by Killertechno
Thu Nov 22, 2018 9:49 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: ENC28J60 SPI Ethernet
Replies: 33
Views: 53863

Re: ENC28J60 SPI Ethernet

I'm not used to connect devices randomly....

eth2 is usb to lan converter.
I already changed ethernet cable, tested straight and cross, changed router port.
dhcpconf.d is the default of Debian image (2018-april).
by Killertechno
Thu Nov 22, 2018 4:10 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: ENC28J60 SPI Ethernet
Replies: 33
Views: 53863

Re: ENC28J60 SPI Ethernet

Here picture of board.
by Killertechno
Thu Nov 22, 2018 3:54 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: ENC28J60 SPI Ethernet
Replies: 33
Views: 53863

Re: ENC28J60 SPI Ethernet

Did you enable SPI with 'sudo raspi-config'? Obviously, I followed guides on connecting ENC28J60 on Raspberry forum. Can you show us how you wired the module? Are you sure you used the correct pins (using Broadcom numbering, not physical numbering)? Can you see eth1 with 'ifconfig'? Can you see the...
by Killertechno
Thu Nov 22, 2018 10:41 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: ENC28J60 SPI Ethernet
Replies: 33
Views: 53863

Re: ENC28J60 SPI Ethernet

Hi to all, I write here avoiding open new thread. I bought ENC28J60 module from web, I connected wires (I left INT on GPIO25) and I added dtoverlay=enc28j60 on config.txt. I correctly find new eth1 interface running ifconfig (missing interface if enc28j60 module unconnected). I use eth0 on dhcp (ori...
by Killertechno
Tue Nov 20, 2018 9:42 am
Forum: Compute Module
Topic: Doubt on remapping pins
Replies: 2
Views: 2806

Re: Doubt on remapping pins

Ok, understood, thanks.
by Killertechno
Sat Nov 17, 2018 10:18 pm
Forum: Compute Module
Topic: Doubt on remapping pins
Replies: 2
Views: 2806

Doubt on remapping pins

Hi to all, mayube it would be a stupid question but I've never seen it before: on CM I can remap pins and get alternate pinfunction writing on config.txt file.
Well.
But... about previous versions of Pi?
Is it possible do the same on Pi 2? (get second UART or remap peripherals)
Thanks.
by Killertechno
Mon Sep 24, 2018 3:58 pm
Forum: Python
Topic: Graph real-time streaming data on webpage
Replies: 5
Views: 3859

Re: Graph real-time streaming data on webpage

But it looks a simple graph updated when pressing button... or am I wrong?
by Killertechno
Mon Sep 24, 2018 2:37 pm
Forum: Python
Topic: Graph real-time streaming data on webpage
Replies: 5
Views: 3859

Graph real-time streaming data on webpage

Hi to all, I'm newbie in python and webpages. My target is webpage to show realtime data such this example: https://github.com/plotly/Streaming-Demos#graphing-real-time-sensor-data I'm going to read realtime sensor data (50 or 100 samples/second), to be shown in 1/2 (or more) seconds refresh interva...
by Killertechno
Fri Sep 21, 2018 4:23 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Interfacing to MiniPCI-e USB devices?
Replies: 0
Views: 387

Interfacing to MiniPCI-e USB devices?

Hi to all, some devices are build in MiniPCI-e form factor (such Quectel UC20 modem): there are USB and UART pins for interfacing, SIM pins and power supply pins present on MiniPCU-e pinout. So I suppose (just about USB) I can connect USB terminals to USB connector of Raspberry (don't take care abou...
by Killertechno
Fri Sep 21, 2018 2:07 pm
Forum: Other projects
Topic: Reusing/Interfacing a Mini PCIe wifi Card
Replies: 3
Views: 6101

Re: Reusing/Interfacing a Mini PCIe wifi Card

Hi guys, avoiding to open similar thread.... I haven't MiniPci-e card available for tests, obviously I don't mean to create a full MiniPci-e interface, but I've read there are reserved pins for USB on MiniPci-e interface (available working USB depends either from host and/or MiniPci-e board) so I su...
by Killertechno
Mon Aug 20, 2018 8:12 pm
Forum: Advanced users
Topic: [RTC] DS3231 clock calibration (doubts and trouble)
Replies: 4
Views: 846

Re: [RTC] DS3231 clock calibration (doubts and trouble)

Paul Hutch wrote: I'd be suspicious that it will not actually meet the full set of specifications like a brand new chip will.
It meets. 1 ppm is within specifications, but regardless temperature.
I just suggested to trim DS3231 depending temperature to increase accuracy.
by Killertechno
Sun Aug 19, 2018 12:27 pm
Forum: Advanced users
Topic: [RTC] DS3231 clock calibration (doubts and trouble)
Replies: 4
Views: 846

Re: [RTC] DS3231 clock calibration (doubts and trouble)

Which do you think is more accurate and precise?
You don't need to do this question.

How could you say "may not be real "?
Comparison among different GPS receivers (not taking care of cable length) I see PPS edge offset difference is whithin 10us, no drift.
by Killertechno
Fri Aug 17, 2018 3:39 pm
Forum: Advanced users
Topic: [RTC] DS3231 clock calibration (doubts and trouble)
Replies: 4
Views: 846

[RTC] DS3231 clock calibration (doubts and trouble)

Hi to all, I need to sync external hardware for acquire data @500 SPS, so to keep time updated I used DS3231 on my Pi. First of all, I compared DS3231 square wave to PPS output of GPS receiver (Ublox Neo-M8T). I've seen there is a drift between DS3231 output and PPS signal, so taking a look I discov...
by Killertechno
Tue Aug 14, 2018 9:49 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: [RTC] Access to RTC registers?
Replies: 2
Views: 686

[RTC] Access to RTC registers?

Hi to all, I installed DS3231 RTC, enabled kernel modules and so on. It works. Taking a look to kernel module with lsmod, I saw it's loaded DS1307 module, where it can manage several RTC chips. Now I need to access to DS3231 registers to set specific configuration for interrupt and square wave outpu...

Go to advanced search