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.

44 lines
957 B

  1. /*
  2. Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
  3. This program is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License
  5. version 2 as published by the Free Software Foundation.
  6. */
  7. /* Galileo support from spaniakos <spaniakos@gmail.com> */
  8. /**
  9. * @file printf.h
  10. *
  11. * Setup necessary to direct stdout to the Arduino Serial library, which
  12. * enables 'printf'
  13. */
  14. #ifndef __PRINTF_H__
  15. #define __PRINTF_H__
  16. #if defined (ARDUINO_ARCH_AVR) || defined(__ARDUINO_X86__)
  17. int serial_putc( char c, FILE * )
  18. {
  19. Serial.write( c );
  20. return c;
  21. }
  22. #endif
  23. void printf_begin(void)
  24. {
  25. #if defined (ARDUINO_ARCH_AVR)
  26. fdevopen( &serial_putc, 0 );
  27. #elif defined (__ARDUINO_X86__)
  28. //JESUS - For reddirect stdout to /dev/ttyGS0 (Serial Monitor port)
  29. stdout = freopen("/dev/ttyGS0","w",stdout);
  30. delay(500);
  31. printf("redirecting to Serial...");
  32. #endif
  33. }
  34. #endif // __PRINTF_H__