arduino stuffs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef GDSERIAL_H
#define GDSERIAL_H

#include <Godot.hpp>

namespace godot {

class GDSerial : public Reference {
  GODOT_CLASS(GDSerial, Reference)

private:
  int serial_port;

public:
  static void _register_methods();

  GDSerial();
  ~GDSerial();

  void _init(); // our initializer called by Godot

  bool start(String port, int baud_rate);
  void end();
  void send(String text);
  int get_available();
  String read_string();
};

} // namespace godot

#endif