Go to advanced search

by danjperron
Mon Sep 24, 2018 4:44 pm
Forum: Beginners
Topic: Sunwait + cron, but it's not working
Replies: 12
Views: 265

Re: Sunwait + cron, but it's not working

ok different angle what is milight ?

A C compiled version ?
A bash script ?
by danjperron
Mon Sep 24, 2018 4:08 pm
Forum: C/C++
Topic: How to control SK6812 LED's using C source code
Replies: 14
Views: 317

Re: How to control SK6812 LED's using C source code

If you don't want to use SPI then the DMA is the option

https://github.com/jgarff/rpi_ws281x
by danjperron
Mon Sep 24, 2018 11:13 am
Forum: C/C++
Topic: How to control SK6812 LED's using C source code
Replies: 14
Views: 317

Re: How to control SK6812 LED's using C source code

Did you try the SPI version ? I was using PWM first but I found out that SPI was more stable. Maybe if you use one dedicated cpu or use a real time linux patch for PWM it will be better. Eventually I used an esp8266 because it was cheaper , start in less than 10 seconds and was using a lot less powe...
by danjperron
Sat Sep 22, 2018 8:23 pm
Forum: Beginners
Topic: How can i detect a Bluetooth controller disconnect within seconds
Replies: 5
Views: 94

Re: How can i detect a Bluetooth controller disconnect within seconds

Why not sending some kind of ping twice every second. If the remote doesn't received a ping after 1 sec simply stop!
by danjperron
Sat Sep 22, 2018 2:33 am
Forum: Français
Topic: Servomoteur hystérique
Replies: 6
Views: 247

Re: Servomoteur hystérique

Les spécifications des servos moteur demandent une répétiton du signal à toute les 20 msec (50hz). Si c'est plus lent il y des risque que le moteur tombe en arrêt donc il se désactives. Ce sont tes vibrations. Moteur coupe oops bouge, coupe, bouge....etc Le Raspberry PI 3 , si tu as un PI3, a une ho...
by danjperron
Fri Sep 21, 2018 11:17 pm
Forum: General discussion
Topic: MCP3008 readings
Replies: 163
Views: 2891

Re: MCP3008 readings

I got an ACS712-05, 20 and 30! But the ACS712-30 was not a 30A but a 5A even if it is mark 30A the curve behave like the 5A. I decide to test the ACS712-05 and the ACS712-20 versus a 0.1Ω resistor https://dl.dropboxusercontent.com/s/p3nfytnkrg8ucrd/ACS712TestLabel.jpg The result was good even if my ...
by danjperron
Fri Sep 21, 2018 12:50 pm
Forum: Beginners
Topic: Port:80
Replies: 21
Views: 250

Re: Port:80

The port 80 is normally dedicated to http server. Then install apache,nginx or any web server sudo apt-get install nginx or sudo apt-get install apache2 Now if you use another computer and do http://raspberrypi.local, A web page from your raspberry pi will open. B.T.W. Windows computer won't find ht...
by danjperron
Thu Sep 20, 2018 10:44 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Multiple RPI on I2C bus and hat EPROM
Replies: 5
Views: 175

Re: Multiple RPI on I2C bus and hat EPROM

Each Raspberry Pi has pull up resistors on SLA and SDA. What will you do with them?

Joan's pigpio could simulate i2c slave.
http://abyz.me.uk/rpi/pigpio/

Why i2c protocol ? The network is way faster!
by danjperron
Wed Sep 19, 2018 11:10 am
Forum: General discussion
Topic: crontab not executing
Replies: 7
Views: 144

Re: crontab not executing

Could you do a file open and write the data to it instead?
by danjperron
Tue Sep 18, 2018 5:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Multiple I2C devices sharing an interrupt line
Replies: 3
Views: 117

Re: Multiple I2C devices sharing an interrupt line

My intend was the second method.
But if you really want to reduce the number of gpio. Add your irq into a gpio like the mcp23017 and then make it the interrupt generator. This way you read the mcp23017 to figure out which one create the irq.
by danjperron
Tue Sep 18, 2018 2:52 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: [Solved] How to read MIFARE DESfire EV2 tags with MFRC522 properly?
Replies: 7
Views: 141

Re: [Solved] How to read MIFARE DESfire EV2 tags with MFRC522 properly?

I Just updated the github with cleaner code and a working Read function. the DEBUG print are an option. git clone https://github.com/danjperron/MFRC522-python cd MFRC522-python python Read.[email protected]:~/MFRC522-python $ python Read.py Welcome to the MFRC522 data read example Press Ctrl-C to stop. Card ...
by danjperron
Tue Sep 18, 2018 12:52 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Multiple I2C devices sharing an interrupt line
Replies: 3
Views: 117

Re: Multiple I2C devices sharing an interrupt line

Maybe the best approach will be to set all individual interrupt to a specific GPIO and collect them all with the use of a AND or OR gate to the GPIO for the ISR. AND gate for interrupt low, OR gate for interrupt high

On interrupt just read the GPIO port to figure out which device set the isr.
by danjperron
Tue Sep 18, 2018 4:21 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: [Solved] How to read MIFARE DESfire EV2 tags with MFRC522 properly?
Replies: 7
Views: 141

Re: How to read MIFARE DESfire EV2 tags with MFRC522 properly?

It is not fully complete but I modified MFRC522 to read RFID card with 7 and 10 bytes ID I added some debug print out. it will need to be clean and verify but looks like this works!! :D [email protected]:~/MFRC522-python $ python Read.py Welcome to the MFRC522 data read example Press Ctrl-C to stop. Card detec...
by danjperron
Mon Sep 17, 2018 10:56 pm
Forum: General discussion
Topic: rtcwake: /dev/rtc0 not enabled for wakeup events
Replies: 8
Views: 608

Re: rtcwake: /dev/rtc0 not enabled for wakeup events

I did used a RTC to power UP and shutting down and Raspberry PI. I had to used an DC/DC converter to fully power down the Pi. But the RTC wake up the PI when it enables the power on the DC/DC converter. https://www.raspberrypi.org/forums/viewtopic.php?p=1074313&sid=fb843bd26b1bd89f9f73f33edc0f5d65#p...
by danjperron
Mon Sep 17, 2018 6:40 pm
Forum: General discussion
Topic: MCP3008 readings
Replies: 163
Views: 2891

Re: MCP3008 readings

Voltage are needed too in the highest resolution you could get. Not just 2 numbers.

Why do I need the Voltages? Simple for verification purpose. I want to be sure that nothing is wrong.


Please all values related to Ground.

ACS712 output
ACS712 VCC
ADS1115 IN0
ADS1116 IN1
by danjperron
Mon Sep 17, 2018 6:38 pm
Forum: General discussion
Topic: RS485 module
Replies: 7
Views: 189

Re: RS485 module

I did a schematic like this one and I got some difficulties when the capacitive load of the cable start to be big.(long cable). The problem is when the serial communication is in mark mode ,level 1, the output is tri-state and only the pullup rise the signal up. The mosfet has a delay but not enough...
by danjperron
Mon Sep 17, 2018 4:12 pm
Forum: General discussion
Topic: MCP3008 readings
Replies: 163
Views: 2891

Re: MCP3008 readings

2.57 is 3 digits, you need to add one to each of the values you wrote or change "digits" to "decimal places". No I need digits! Error is by the number of accurate digits you have. 555.5V and 5.555V have the same accuracy in %. I need more digits on the data input information, not on the correction ...
by danjperron
Mon Sep 17, 2018 3:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: [Solved] How to read MIFARE DESfire EV2 tags with MFRC522 properly?
Replies: 7
Views: 141

Re: How to read MIFARE DESfire EV2 tags with MFRC522 properly?

I looked at the python code and there are some changes to do. Some mifare cards could report up to 10 bytes of data. but the python code just look at range(0,5). There is some added collision check to do for card with 7 or 10 bytes long. I will check it tonight if this python class could be change t...
by danjperron
Mon Sep 17, 2018 11:06 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: [Solved] How to read MIFARE DESfire EV2 tags with MFRC522 properly?
Replies: 7
Views: 141

Re: How to read MIFARE DESfire EV2 tags with MFRC522 properly?

I did find one version on google which works very well with any size id. https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/rpi-rc522/source-archive.zip I modified the original code to get ridd of bcm2835 library. git clone https://github.com/danjperron/rc522_reader cd rc52...
by danjperron
Sun Sep 16, 2018 8:26 pm
Forum: General discussion
Topic: MCP3008 readings
Replies: 163
Views: 2891

Re: MCP3008 readings

Change ACS712_VOffset to 2.57 into the scrip ACS712_VOffset = 2.57 But, I suspect that your multimeter is not exact to calculate the resistor. both 4k7 and 10K display the same value in 2 digits. Really need 3 digits. To verify if our calculation is correct you should use a voltmeter and measure wit...
by danjperron
Sun Sep 16, 2018 4:28 pm
Forum: General discussion
Topic: MCP3008 readings
Replies: 163
Views: 2891

Re: MCP3008 readings

This is a endless tale! Could you do this! 1 - Correct R3 and R4 . You need to swap them. 2- I simplify my fritzing schema by adding the resistors labels. Also the resistors show the correct colour bars. Could you make your protoboard like mine. Just need to swap R3 and R4 and complete the unfinishe...
by danjperron
Sun Sep 16, 2018 2:12 pm
Forum: General discussion
Topic: MCP3008 readings
Replies: 163
Views: 2891

Re: MCP3008 readings

You know this a simple stage. Two resistors divider to get the correct Voltage to the A/D converter. This is not hard. B.T.W. On the script those resistors are R3 and R4. The thing we want is to read 5V under the A/D converter reference. Also we want to use something near the full span to increase a...
by danjperron
Sun Sep 16, 2018 1:46 pm
Forum: Beginners
Topic: How can I connect Canbus and RFID to the same PI?
Replies: 4
Views: 131

Re: How can I connect Canbus and RFID to the same PI?

Check in /boot/overlays/README If you want your canbus on SPI0 CE1 then dtoverlay=mcp2515-can1,oscillator=8000000,interrupt=12 If you want your rc522 on CE1 then you will have to change the code in the class MFRC522.py line 112 def __init__(self, dev='/dev/spidev0.1', spd=1000000): But I think that ...
by danjperron
Sun Sep 16, 2018 12:37 pm
Forum: General discussion
Topic: MCP3008 readings
Replies: 163
Views: 2891

Re: MCP3008 readings

I don't have and ADS1115 so I emulating it. read_adc was my emulating function. Good you fixed it ! The line 111, the other print line, is a debug line. Just take it out when thing works. Did you set your resistors values into the code? Good that you have found the mistake. And are the values that y...
by danjperron
Sun Sep 16, 2018 12:52 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C read always get first byte
Replies: 8
Views: 250

Re: I2C read always get first byte

1) First, the message is being built when I change a variable instead in OnRequested. 2) In my Pi side, I send a i2cget with address (the Arduino get that address in OnReceived) and I store that in a global variable. 3) After OnReceived, the arduino will Call the OnRequested function, where it's se...

Go to advanced search