Ein Roboter mit bürstenlosem Antrieb, differenzial und NRF24L01 Funk. Großflächig gebaut um ein großes Solarpanel aufzunehmen. https://gitlab.informatik.hs-fulda.de/fdai5253/roboter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.4 KiB

  1. This is a fork from **http://tmrh20.github.io/RF24** which can be build as a static library for Atmel Studio 7.
  2. Not all files are needed.
  3. Just copy the following structure into a GCC Static Library project in AS7:
  4. ```
  5. utility\
  6. ATXMega256D3\
  7. compatibility.c
  8. compatibility.h
  9. gpio.cpp
  10. gpio.h
  11. gpio_helper.c
  12. gpio_helper.h
  13. includes.h
  14. RF24_arch_config.h
  15. spi.cpp
  16. spi.h
  17. nRF24L01.h
  18. printf.h
  19. RF24.cpp
  20. RF24.h
  21. RF24_config.h
  22. ```
  23. Only ATXMega256D3 is supported right now!
  24. ## Notes
  25. The millisecond functionality is based on the TCE0 so don't use these pins as IO.
  26. The operating frequency of the uC is 32MHz. If else change the TCE0 registers appropriatly in function **__start_timer()** in **compatibility.c** file for your frequency.
  27. ## Usage
  28. Add the library to your project!
  29. In the file where the **main()** is put the following in order to update the millisecond functionality:
  30. ```
  31. ISR(TCE0_OVF_vect)
  32. {
  33. update_milisec();
  34. }
  35. ```
  36. Declare the rf24 radio with **RF24 radio(XMEGA_PORTC_PIN3, XMEGA_SPI_PORT_C);**
  37. First parameter is the CE pin which can be any available pin on the uC.
  38. Second parameter is the CS which can be on port C (**XMEGA_SPI_PORT_C**) or on port D (**XMEGA_SPI_PORT_D**).
  39. Call the **__start_timer()** to start the millisecond timer.
  40. ** For further information please see http://tmrh20.github.io/RF24 for all documentation**