目前正在查看此代码,我正在尝试使用Arduino
创建家庭照明系统。它可用作电视背光系统,其中边缘像素被平均并在相应的LED's
上表示。因此,我正在考虑这个项目here。
import java.awt.Robot; //java library that lets us take screenshots
import java.awt.AWTException;
import java.awt.event.InputEvent;
import java.awt.image.BufferedImage;
import java.awt.Rectangle;
import java.awt.Dimension;
import processing.serial.*; //library for serial communication
Serial port; //creates object "port" of serial class
Robot robby; //creates object "robby" of robot class
void setup()
{
port = new Serial(this, Serial.list()[0],9600); //set baud rate
size(100, 100); //window size (doesn't matter)
/*try //standard Robot class error check
{
robby = new Robot();
}
catch (AWTException e)
{
println("Robot class not supported by your system!");
exit();
}*/
}
但是,当我实例化Serial
时,我得到了这个错误。
这里出了什么问题?