Advertisement
rric

einer_sendet_aus

Feb 6th, 2024 (edited)
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.23 KB | None | 0 0
  1. # Dieser micro:bit ist Anfang einer "Nachrichten-Kette": Nachrichten werden
  2. # angezeigt und zum nächsten Nachbarn weiter gesendet
  3. # Copyright 2023, 2024 Roland Richter                [Mu: BBC micro:bit]
  4.  
  5. import microbit
  6. import radio
  7.  
  8. def send_text(txt):
  9.     microbit.display.scroll(str(txt))
  10.     radio.config(power=7)
  11.     radio.send(str(txt))
  12.     microbit.sleep(100)
  13.  
  14. radio.on()
  15. radio.config(channel=0)
  16.  
  17. satz = ["Servus", "im", "Talente", "Kurs", "!"]
  18.  
  19. while True:
  20.     for wort in satz:
  21.         send_text(wort)
  22.  
  23.  
  24. # ----------------------------------------------------------------------
  25. # This program is free software: you can redistribute it and/or modify
  26. # it under the terms of the GNU General Public License as published by
  27. # the Free Software Foundation, either version 3 of the License, or
  28. # (at your option) any later version.
  29. #
  30. # This program is distributed in the hope that it will be useful,
  31. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  32. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  33. # GNU General Public License for more details.
  34. #
  35. # You should have received a copy of the GNU General Public License
  36. # along with this program.  If not, see <https://www.gnu.org/licenses/>.
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement