Go to advanced search

by GuruMeditation
Thu Nov 08, 2018 12:24 pm
Forum: General discussion
Topic: Cardash cam
Replies: 5
Views: 328

Re: Cardash cam

Very cool.

You could replace the RTC module with a GPS module to get both time and location.

PS: scripts are the Unix way ;)
by GuruMeditation
Thu Nov 08, 2018 9:33 am
Forum: General discussion
Topic: Raspberry Pi "Authorized Service Center"
Replies: 7
Views: 622

Re: Raspberry Pi "Authorized Service Center"

Considering the potential cost to them of this sort of insurance and related claims it is to be expected that they have a series of hoops to make you jump through. Essentially these are designed to ignore small (if not most) claims because either you won't be able to provide what they ask or you won...
by GuruMeditation
Wed Jun 20, 2018 2:01 pm
Forum: Off topic discussion
Topic: Pis find illegal images
Replies: 11
Views: 1329

Re: Pis find illegal images

From the article: However it is illegal to possess images of child abuse, digitally or in print In which case, how does one process such images for recognition and filtering purposes without breaking the law? How does one train such a system without feeding it thousands of similarly illegal images,...
by GuruMeditation
Wed Jun 20, 2018 1:57 pm
Forum: Networking and servers
Topic: Make Raspberry Pi as web server for deployment of web application
Replies: 8
Views: 1204

Re: Make Raspberry Pi as web server for deployment of web application

If you want to deploy a web app for public use the easiest is to get yourself a $5 instance from Linode or similar. It's very cheap and you don't have to worry about the hardware, connectivity, or uptime.
by GuruMeditation
Mon Jun 11, 2018 4:10 pm
Forum: General discussion
Topic: Wifi AP Mode number of concurrent connections.
Replies: 6
Views: 397

Re: Wifi AP Mode number of concurrent connections.

I think Wifi repeaters only do just that so that the AP must still handle all the connections itself.

To cut the number of connections per AP you would then need several actual APs.
by GuruMeditation
Mon Jun 11, 2018 3:14 pm
Forum: General discussion
Topic: Wifi AP Mode number of concurrent connections.
Replies: 6
Views: 397

Re: Wifi AP Mode number of concurrent connections.

Spec. for 802.11 says 2007 associations max. This is unrealistic in practice. Also, with encryption (WPA, WPA2), many APs cannot handle more than 50-64 connections, which is already a lot. The technology is not really designed to handle too many devices because it isn't designed unfrequent, small pa...
by GuruMeditation
Mon Jun 11, 2018 11:19 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Send 64 bit from one Raspberry PI 3 B to another
Replies: 30
Views: 1974

Re: Send 64 bit from one Raspberry PI 3 B to another

steve041264 wrote:
Mon Jun 11, 2018 11:15 am
Having seen that 433MHz, use a port that is not SPI, I2C or UART, why should not it work without connecting a pin and GND?
If that's really the case then it must be a flavour of 1-wire interface, as mentioned.
by GuruMeditation
Mon Jun 11, 2018 11:12 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Send 64 bit from one Raspberry PI 3 B to another
Replies: 30
Views: 1974

Re: Send 64 bit from one Raspberry PI 3 B to another

RF modules usually use the standard SPI interface. But we're digressing. The point is that if hardware interfaces are used up then you can use GPIOs and implement an interface in software, including the clock if needed (e.g. for SPI). There are libraries. I'm also surprised that you only have 1 GPIO...
by GuruMeditation
Mon Jun 11, 2018 10:52 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Send 64 bit from one Raspberry PI 3 B to another
Replies: 30
Views: 1974

Re: Send 64 bit from one Raspberry PI 3 B to another

The RaspberryPI's hardware SPI does not support slave mode.

If you look for a software SPI library (or 1-wire, etc), you may be able to find one that does.

433MHz RF module are usually controlled through SPI. If there are connected to plain GPIOs it implies that a software SPI interface is used.
by GuruMeditation
Mon Jun 11, 2018 9:45 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Send 64 bit from one Raspberry PI 3 B to another
Replies: 30
Views: 1974

Re: Send 64 bit from one Raspberry PI 3 B to another

IMHO, using a single wire without a second one to provide a clock is a bit tricky. E.g. many 1-wire interfaces use short and long pulses to send 0 or 1. So one way would be to do that in software.

With 2 wires you could use a software SPI implementation.
by GuruMeditation
Wed Jun 06, 2018 7:24 am
Forum: Automation, sensing and robotics
Topic: Relay Module KY-019 5V
Replies: 488
Views: 77177

Re: Relay Module KY-019 5V

Make sure that the box is earthed ;)
by GuruMeditation
Tue Jun 05, 2018 10:57 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c write to EEPROM ok. Dont know how to read back.
Replies: 5
Views: 925

Re: i2c write to EEPROM ok. Dont know how to read back.

To be fair, although the module is called 'smbus' the function is called 'write_i2c_block_data' and described as part of "I2C access functions"... Clear it is not.
by GuruMeditation
Tue Jun 05, 2018 8:52 am
Forum: Automation, sensing and robotics
Topic: Relay Module KY-019 5V
Replies: 488
Views: 77177

Re: Relay Module KY-019 5V

A word of caution with relays used to switch mains power.

If they don't include opto-coupling insulation (and maybe even if they say they do) I would strongly suggest that they should be controlled through an opto-coupler and not directly a GPIO or transistor.
by GuruMeditation
Tue Jun 05, 2018 8:02 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c write to EEPROM ok. Dont know how to read back.
Replies: 5
Views: 925

Re: i2c write to EEPROM ok. Dont know how to read back.

You may be better off directly using the SMBus functions. Reading seems to require a bit of work. It's described in the datasheet (section 8.2 and figure 8.2) but, IMHO, there is an error: there should be a Stop condition after the address is sent. This seems correct: http://dangerousprototypes.com/...
by GuruMeditation
Sun Jun 03, 2018 9:19 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 6823

Re: Dynamic sized arrays

Outside of purpose-built embedded control systems such as those covered by MISRA standards, it is reasonable to write programs that can operate on different sizes of datasets without needing to be recompiled. Just for the record: None of what I wrote suggests or implies that programs would need rec...
by GuruMeditation
Sat Jun 02, 2018 1:15 pm
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 6823

Re: Dynamic sized arrays

Not necessarily. It is perfectly OK to pass the address of stack allocated variables to a function further down the stack. For example if you allocated a large array in main() you could safely pass a pointer to it to any other function (apart from co-routines I suppose). Because the function hasn't...
by GuruMeditation
Sat Jun 02, 2018 10:37 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 6823

Re: Dynamic sized arrays

Set your stack size to unlimited using setrlimit to overcome small default stack sizes. Then one can store very large arrays on the stack. That's not exactly a good practice. While all stack allocated variables are local, you can always assign their addresses to a global pointer. Then they are loca...
by GuruMeditation
Sat Jun 02, 2018 9:32 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Communication between 2 RPI via SPI
Replies: 2
Views: 474

Re: Communication between 2 RPI via SPI

You need to connect the SPI clocks as that's what provides synchronisation for the data between the two devices.

You would also need to have one of the RPI as slave. I don't know what level of support there is for this in software or hardware.
by GuruMeditation
Sat Jun 02, 2018 9:28 am
Forum: C/C++
Topic: Trouble with SPI read
Replies: 6
Views: 2689

Re: Trouble with SPI read

I don't think that WiringPI has an API function that separates the two buffers, which is a shame since they are separate internally (you can check the code). You could copy the data into a second array that you then use for wiringPiSPIDataRW(). After the function call both arrays' contents should st...
by GuruMeditation
Fri Jun 01, 2018 8:07 pm
Forum: C/C++
Topic: Trouble with SPI read
Replies: 6
Views: 2689

Re: Trouble with SPI read

The SPI interface is full duplex so I'm suspecting that, as you first write then read, there is no data to be read when you call 'read'. Hence 0.

If so then try using wiringPiSPIDataRW().
by GuruMeditation
Fri Jun 01, 2018 9:46 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: WiringPiSpi adds a adds a zero to subsequent sends.
Replies: 2
Views: 293

Re: WiringPiSpi adds a adds a zero to subsequent sends.

The SPI interface is full duplex and so is wiringPiSPIDataRW() From wiringPI's website on wiringPiSPIDataRW(): This performs a simultaneous write/read transaction over the selected SPI bus. Data that was in your buffer is overwritten by data returned from the SPI bus. The first time you call the fun...
by GuruMeditation
Fri Jun 01, 2018 8:55 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 6823

Re: Dynamic sized arrays

But what happens if it's really big, big enough to take a big proportion of your available RAM? 700MB on the Pi say. Surely then the vector cannot reallocate and copy when it finds you need yet another byte. There is not enough room left to do so. I have no idea what a C++ vector does then. bad_all...
by GuruMeditation
Fri Jun 01, 2018 8:31 am
Forum: Français
Topic: Alimenter un HD externe avec un Pi 3
Replies: 7
Views: 832

Re: Alimenter un HD externe avec un Pi 3

Tu n'as pas besoin de te préoccuper des tensions nécessaires pour le disque dur lui-même (12V en effet). Le boitier des disques externes comporte un circuit qui s'occupe de tout (tensions, conversions USB vers SATA, etc).
by GuruMeditation
Fri Jun 01, 2018 8:03 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 6823

Re: Dynamic sized arrays

Heater wrote:
Fri Jun 01, 2018 7:51 am
a) That C++ vector does not do a reallocation every time you add a little thing to it. The vector's underlying capacity will be bigger than your data content.
Yes, obviously. My point was about reallocation of large arrays.

Maybe I'm too old school :D
by GuruMeditation
Fri Jun 01, 2018 7:22 am
Forum: C/C++
Topic: c++ wiringPi gsm AT commands ctrl+Z problem
Replies: 10
Views: 1151

Re: c++ wiringPi gsm AT commands ctrl+Z problem

Not too sure where the discussion is going. Just to point out that Ctrl-Z here is not related to the OS but to the AT commands protocol.

Go to advanced search