Editor Version ×
recommended

Pro Edition

free

Brand new interactions and interfaces

Smooth support for design sizes of over 3W

devices or 10W pads

More rigorous design constraints, more

standardized processes

For enterprises, more professional users

Std Edition

Easy to use and quick to get started

The process supports design scales of 300

devices or 1000 pads

Supports simple circuit simulation

For students, teachers, creators

Ongoing

STD DIY Transmitter 3 Channel

DIY Transmitter 3 Channel

Project tags

License

License:

Mode:

Mode

Editors' pick

Editors' pick

  • 678
  • 0
  • 0
Update time: 2022-01-21 17:38:31
Creation time: 2022-01-08 02:41:19
Description

Description

Transmitter Code:


// 3 Channel Transmitter #include <SPI.h> #include <nRF24L01.h> #include <RF24.h> const uint64_t pipeOut = 0xE9E8F0F0E1LL; // Match key RF24 radio(9, 10); // Select CE,CSN pin struct Signal { byte throttle; byte steering; byte aux1; }; Signal data; void ResetData() { data.throttle = 127; // Motor stop (Signal lost position) data.steering = 127; // Center (Signal lost position) data.aux1 = 0; // (Signal lost position) } void setup() { //Start everything up radio.begin(); radio.openWritingPipe(pipeOut); radio.setAutoAck(false); radio.setDataRate(RF24_250KBPS); radio.setPALevel(RF24_PA_MAX); radio.stopListening(); //start the radio comunication for Receiver ResetData(); } // Joystick center and it's borders int mapJoystickValues(int val, int lower, int middle, int upper, bool reverse) { val = constrain(val, lower, upper); if ( val < middle ) val = map(val, lower, middle, 0, 128); else val = map(val, middle, upper, 128, 255); return ( reverse ? 255 - val : val ); } void loop() { // Control Stick Calibration // Setting may be required for the correct values of the control levers. data.steering = mapJoystickValues( analogRead(A0), 200, 460, 650, true ); // "true" or "false" for servo direction data.throttle = mapJoystickValues( analogRead(A1), 200, 440,670, true ); // "true" or "false" for signal direction data.aux1 = digitalRead(4); radio.write(&data, sizeof(Signal)); }
Design Drawing

Design Drawing

schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
Project Attachments

Project Attachments

Empty
Project Members

Project Members

Target complaint
Related Projects
Change a batch
Loading...

Comment

Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn