Editor Version ×
Standard

1.Easy to use and quick to get started

2.The process supports design scales of 300 devices or 1000 pads

3.Supports simple circuit simulation

4.For students, teachers, creators

Profession

1.Brand new interactions and interfaces

2.Smooth support for design sizes of over 5,000 devices or 10,000 pads

3.More rigorous design constraints, more standardized processes

4.For enterprises, more professional users

Ongoing

STD DIY Transmitter 3 Channel

License:

Mode: Editors' pick

  • 559
  • 0
  • 0
Update time: 2022-01-21 17:38:31
Creation time: 2022-01-08 02:41:19
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
schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
Project Attachments
Empty
Project Members
Target complaint
Related Projects
Change a batch
Loading...
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