Outils pour utilisateurs

Outils du site


arduino_haute_frequence

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
arduino_haute_frequence [2022/09/05 18:28] – [Récupération de la position sur RaspberryPI en python avec SPI] sergearduino_haute_frequence [2022/09/06 07:24] (Version actuelle) – [Optical Encoder USDigital] serge
Ligne 33: Ligne 33:
 </code> </code>
  
- +Ce sketch fonctionne bien sur UNOmais la UNO n'que interruptionsIl n'est pas possible d'ajouter le RAZ avec index (appelé aussi axe Z).
-=====SPI entre Raspberry et Arduino===== +
-**Avec arduino en mode slave** +
- +
-====Ressources==== +
-  * **[[http://robotics.hobbizine.com/raspiduino.html|raspberry pi to arduino spi communication]]** +
- +
-====Slave Mode with SPI.h==== +
-**et avec des interrupt** +
-**[[https://arduino.stackexchange.com/questions/76528/spi-slave-programming-for-arduino|SPI Slave Programming for Arduino]]** @ arduino.stackexchange.com\\ +
-SPI.h library by default only support Master modethe SPI.begin() will automatically set slave select (ss) pin to HIGH whether you have pinMode(ss, OUTPUT) in your setup() code or not and set the Arduino as an SPI master. +
-As the SPI library does not contain the functionality for slave mode, in order to use Arduino as a Slave, you will need to do some customised setup, mainly on  +
-  - setting MISO as OUTPUT for slave to send data +
-  - enable slave mode by setting the SPCR register +
-  - enable interrupt when data is received. +
- +
-====Nick Gammon explique tout sur le SPI==== +
-  * **[[http://www.gammon.com.au/spi|Le site de Nick Gammon sur le SPI]]** [[https://www-gammon-com-au.translate.goog/spi?_x_tr_sl=en&_x_tr_tl=fr&_x_tr_hl=en|traduit FR]] +
- +
-Les scripts sont sur **[[https://github.com/sergeLabo/arduino_high_frequency|GitHub sergeLabo arduino_high_frequency]]** avec la **version python des master**. +
- +
-===How to make an SPI slave=== +
-  * [[https://www.gammon.com.au/forum/?id=10892&reply=1#reply1|la documentation]] +
-  * [[https://github.com/sergeLabo/arduino_high_frequency/tree/main/NG_master_slave_example|le code source NG_master_slave_example]] +
-Montre le problème du 1er transfert. +
- +
-===How to get response from a slave=== +
-  * https://www.gammon.com.au/forum/?id=10892&reply=2#reply2 +
-  * https://www-gammon-com-au.translate.goog/forum/?id=10892&reply=2&_x_tr_sl=en&_x_tr_tl=fr&_x_tr_hl=en#reply2 +
-  * [[https://github.com/sergeLabo/arduino_high_frequency/tree/main/How_to_get_a_response_from_a_slave|le code source ]] +
- +
-===Envoyez et recevez tout type de données === +
-  * https://www.gammon.com.au/forum/?id=10892&reply=8#reply8 +
- +
  
 {{tag>communication sb spi}} {{tag>communication sb spi}}
arduino_haute_frequence.txt · Dernière modification : 2022/09/06 07:24 de serge