Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Arduino Due Support and NexPage change pic method #95

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
13 changes: 13 additions & 0 deletions NexPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,16 @@ bool NexPage::show(void)
return recvRetCommandFinished();
}

bool NexPage::setPic(uint32_t number)
{
char buf[10] = {0};
String cmd;

utoa(number, buf, 10);
cmd += getObjName();
cmd += ".pic=";
cmd += buf;

sendCommand(cmd.c_str());
return recvRetCommandFinished();
}
10 changes: 10 additions & 0 deletions NexPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ class NexPage: public NexTouch
* @return true if success, false for faileure.
*/
bool show(void);

/**
* Set picture's number.
*
* @param number -the picture number.
*
* @retval true - success.
* @retval false - failed.
*/
bool setPic(uint32_t number);
};
/**
* @}
Expand Down
6 changes: 5 additions & 1 deletion NexUpload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
*/

#include "NexUpload.h"
#include <SoftwareSerial.h>

//#define USE_SOFTWARE_SERIAL

#ifdef USE_SOFTWARE_SERIAL
#include <SoftwareSerial.h>
#endif

#ifdef USE_SOFTWARE_SERIAL
SoftwareSerial dbSerial(3, 2); /* RX:D3, TX:D2 */
#define DEBUG_SERIAL_ENABLE
Expand Down