Go Down

Topic: "#error CPU not yet supported" when running standard example on Arduino Uno Wifi (Read 388 times) previous topic - next topic


I have an Arduino Uno Wifi and I would like to set it up so that it can receive messages from a python script on my laptop. I was attempting to run the RestClient.ino example that comes with the IDE:

Code: [Select]
#include <Wire.h>
#include <Ciao.h>

#define CONNECTOR     "rest"
#define SERVER_ADDR   "" // change ip address with your server ip address

int buttonState; //this variable tracks the state of the button, low if not pressed, high if pressed
int ledState = HIGH; //this variable tracks the state of the LED, negative if off, positive if on
long lastDebounceTime = 0;  // the last time the output pin was toggled
long debounceDelay = 50;    // the debounce time; increase if the output flickers
String command = "/arduino/mode/13/output";
int previous_value = LOW;

void setup() {
  Ciao.write(CONNECTOR, SERVER_ADDR, command);
  pinMode(2, INPUT);
void loop() {
  //sample the state of the button - is it pressed or not?
  buttonState = digitalRead(2);
  //filter out any noise by setting a time buffer
  if ( (buttonState == HIGH) && (previous_value == LOW) && (millis() - lastDebounceTime) > debounceDelay ) {
     if (ledState == HIGH){
         command = "/arduino/digital/13/0";
         ledState = LOW;
         command = "/arduino/digital/13/1";
         ledState = HIGH;
     lastDebounceTime = millis(); //set the current time
     CiaoData data = Ciao.write(CONNECTOR, SERVER_ADDR, command); 
      if (!data.isEmpty()){
        Ciao.println( "State: " + String (data.get(1)) );
        Ciao.println( "Response: " + String (data.get(2)) );
       Ciao.println ("Write Error");

 previous_value = buttonState;

but when I try to compile I get the error: "#error CPU not yet supported" from Ciao. Does anyone know of a work around for this? I've seen some references to solutions online, such as here (use google translate for english). But since arduino.org just redirects to arduino.cc now I can't access the posts.

I'm also interested in other methods for communicating with the Arduino over Wifi, and I would be very appreciative of your guidance. I am able to send serial data to/from the built-in webapp, but I can't figure out how to make a similar connection with python. This problem is a lot trickier than I had anticipated!


I don't see anything particularly processor specific in the Ciao library. Try editing Ciao/src/Ciao.h - add another #if defined() for __AVR_ATmega328P__ , set an appropriate BAUDRATE and set SERIAL_PORT_IN_USE to Serial.


I'm not sure if you ever found a solution for this, but I found out that using the latest Arduino IDE and replacing

#include <Ciao.h>


#include <UnoWiFiDevEd.h>

(After installing the Arduino Uno Wifi developer edition library of course)

did the trick! The connection between arduinos works pretty well, even though it has a little lag. The debounce code in the example didn't seem to do the trick tho, it flickers between HIGH and LOW. I'll try using the original example of debounce just to check if that does work or if it is perhaps a lag problem. I also tried this connection with a potentiometer, replacing the command variable with an /arduino/analog/10/(reading of the potentiometer divided by 4) and it worked like a charm!

Go Up