Engineering and technology
How to Use Modbus with Arduino
esp8266 – AT+CIPSEND command does not return “>” in Arduino code but working manually – Stack Overflow
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
#define DEBUG true
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
mySerial.begin(9600);
sendData("AT+RST\r\n", 2000, DEBUG); // rst
sendData("AT+CWJAP=\"wifi namne\",\"password\"\r\n", 3000, DEBUG); //enter name and password
}
void loop() {
int key;
sendData("AT+CWMODE=1\r\n", 1000, DEBUG); // access point
sendData("AT+CIFSR\r\n", 1000, DEBUG); // get ip address
sendData("AT+CIPMUX=1\r\n", 1000, DEBUG); // configure for multiple connections
sendData("AT+CIPSTART=4,\"TCP\",\"api.thingspeak.com\",80\r\n", 1000, DEBUG); // turn on server on port 80
key = 23; //random number for testing
String web = "GET http://api.thingspeak.com/update?api_key=KTQXXXXXXXXXXXXX&field1="";
web += key;
web += "HTTP / 1.0";
web += "\r\n";
web += "\r\n";
String cipsend = "AT + CIPSEND = ";
cipsend += 4;
cipsend += ", ";
cipsend += String(web.length());
cipsend += "\r\n";
sendData(cipsend, 1000, DEBUG);
sendData(web, 10000, DEBUG);
String closeCommand = "AT + CIPCLOSE = ";
closeCommand += 4;// append connection id
closeCommand += "\r\n";
sendData(closeCommand, 3000, DEBUG);
}
String sendData(String command, const int timeout, boolean debug) {
String response = "";
mySerial.print(command); // send the read character to the esp8266
long int time = millis();
while ( (time + timeout) > millis()) {
while (mySerial.available()) {
// output to the serial window
char c = mySerial.read(); // read the next character.
response += c;
}
}
if (debug) {
Serial.print(response);
}
return response;
}
Returning data from AT+CIPSTART from Arduino Uno
Software serial : buffer size limit
FireTV: AAC 5.1 not working
Under settings, put speaker configuration to 2.0 and then enable Enable Dolby Digital transcoding
That will transcode AAC to DD on the fly … AAC passthrough isn’t supported AFAIK
How to interface Arduino, esp8266 or esp32 to RS-485
PDFsam – PDF Split and Merge
IT Automation Full Course for System Administration
Nvidia settings don’t stick
Any changes you make in the NVIDIA X Server Settings utility to brightness, contrast and gamma will revert back to their original default values
after restarting your system, or even after logging out and back in. If you want the changes to remain, then you will have to manually edit the
“.nvidia-settings-rc” file. For the benefit of anyone else reading this topic, this is a hidden file located in “/home/your-user-name” and will only be available after installation of a Nvidia proprietary driver. Open the file and at the bottom add the line:
0/Gamma=0.800
The default value is 1.000 and any value below it will darken the screen. I have mine set to 0.900. This makes any text on the screen a little darker and easier for me to read.
To change the Gamma of only one color add the lines:
0/RedGamma=1.000 (whatever value you want)
0/GreenGamma=1.000
0/BlueGamma=1.000
Save the file. Unfortunately, if you ever reopen the NVIDIA X Server Settings utility, then these settings will be removed from this file and you will
have to manually add them back. This is not a problem for me since I will rarely need to use that utility but for others it may be a good idea to have a backup of that file. Some day if I have some extra time, I may work on this problem.
If this method does not work, then you will also have to add the following line to the xinitrc file located in “/etc/X11/xinit”. Right click on the file and select “Open as Root”. Open the file and add the line:
nvidia-settings –load-config-only
HOWTO setup a private git server on Ubuntu 18.04 – Don’t Panic
why I have a PDP DEACT ??? SIM300C | Forum for Electronics
>> AT+CGATT=1 - Attach to GPRS Service
<< OK
>> AT+CGDCONT=1,"IP","wap.cingular" - Define PDP Context (cid, PDP type, APN)
<< OK
>> AT+CDNSCFG="208.67.222.222","208.67.220.220" - Configure Domain Name Server (primary DNS, secondary DNS)
<< OK
>> AT+CSTT="wap.cingular","wap(at)cingulargprs.com","cingular1" - Start Task & set APN, User ID, and password
<< OK
>> AT+CIICR - Bring up wireless connection with GPRS - THIS MAY TAKE A WHILE
<< OK
>> AT+CIFSR - Get Local IP address
<< 10.190.245.172 - returns IP address assigned to your module
<< OK
>> AT+CIPSTATUS - Get Connection Status
<< OK
<< STATE: IP STATUS - returns status of connection, needs to be 'IP STATUS' before you can connect to a server
After you have context, you need to make a connection to the server and then send your data.
>> AT+CIPHEAD=1 - Tells module to add an 'IP Header' to receive data
<< OK
>> AT+CDNSORIP=1 - Indicates whether connection request will be IP address (0), or domain name (1)
<< OK
>> AT+CIPSTART="TCP","www.google.com","80" - Start up TCP connection (mode, IP address/name, port)
<< OK
<< CONNECT OK - Indicates you've connected to the server - IT MAKE TAKE A WHILE FOR THIS TO BE RETURNED
>> AT+CIPSEND - Issue Send Command
<< > - wait for module to return'>' to indicate it's ready to receive data
>> GET / HTTP/1.1 - Send data - this example is an HTTP request for the default page
>> Host: [url]www.google.com[/url]
>> Connection: Keep-Alive
>> Accept: */*
>> Accept-Language: en-us
>>
<< data from server returned - Server will return data here
Source: why I have a PDP DEACT ??? SIM300C | Forum for Electronics