1

I am writing the following, simple code to try to turn a relay in the PLDuino on and off, and it is giving me warnings and not compiling/uploading. Any help would be greatly appreciated. Here is my code:

#include <PLDuino.h>  
using namespace PLDuino;

void setup()  
{  
  // A necessary call.  
  // It sets pin modes according to their function.  
  PLDuino::init();  
}  

void loop()  
{  
  // Simple switch RELAY3 on and off with 2 second timeout.  
  digitalWrite(PLDuino::RELAY3, HIGH);  
  delay(2000);  
  digitalWrite(PLDuino::RELAY3, LOW);  
  delay(2000);  
}

I have installed the proper libraries. Here are the warnings I am getting:

WARNING: Category 'Graphics' in library PLDTouch is not valid. Setting to 'Uncategorized'
WARNING: Category 'General' in library PLDuino-Library is not valid. Setting to 'Uncategorized'
WARNING: Category 'Graphics' in library PLDuinoGUI is not valid. Setting to 'Uncategorized'
Sketch uses 1702 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
avrdude: ser_open(): can't open device "\\.\COM4": The system cannot find the file specified.


avrdude: ser_drain(): read error: The handle is invalid.


avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
1

For the library warning, you'll need to add / edit library.properties to those folders to specify a valid category.

This is an example library.properties to give you a feel for the structure (I found this particular one here).

name=TMRpcm_PLDuino
version=1.0
author=TMRh20
maintainer=digitalloggers
sentence=PCM/WAV Audio playback (USE_TIMER2 enabled)
paragraph=Play WAV audio files from SD card using AVR (UNO,Nano,etc) based devices.
category=Communication
url=https://github.com/digitalloggers/TMRpcm_PLDuino
architectures=avr

However, these are just warnings, and don't seem to be the cause of your problem.


Your actual problem in this case seems to be that it's trying to upload the sketch via COM4 and it can't find the PLDuino on that port.

  • Ok. So do you know how I can get it to find the PLDuino? – CDDavis Nov 8 '17 at 21:44
  • @CDDavis What operating system are you using? – sempaiscuba Nov 8 '17 at 21:48
  • Windows computer – CDDavis Nov 9 '17 at 1:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.