Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我在为Arduino处理3.0时出错_Arduino - Fatal编程技术网

我在为Arduino处理3.0时出错

我在为Arduino处理3.0时出错,arduino,Arduino,我在为Arduino处理3.0时遇到问题。总是出现以下错误: “无法根据代码确定此草图的大小。请使用 仅size()comand的数字(非变量)。读取size()的值 更多详情请参阅“ 源代码。 所以,是的,你必须使用实际的数字而不是变量 但将曲面设置为可调整大小 然后将其设置为图像尺寸 然后将图像加载到曲面并将其缩放到曲面尺寸 比如说: size(1, 1); surface.setResizable(true); surface.setSize(bgimage.width, b

我在为Arduino处理3.0时遇到问题。总是出现以下错误:

“无法根据代码确定此草图的大小。请使用 仅size()comand的数字(非变量)。读取size()的值 更多详情请参阅“

源代码。

  • 所以,是的,你必须使用实际的数字而不是变量
  • 但将曲面设置为可调整大小
  • 然后将其设置为图像尺寸
  • 然后将图像加载到曲面并将其缩放到曲面尺寸
比如说:

  size(1, 1);
  surface.setResizable(true);
  surface.setSize(bgimage.width, bgimage.height);

  // and when you're ready to actually load the image
  image(bgimage, 0, 0, width, height);