Navigation

    mono community

    Mono

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Search
    1. Home
    2. stoffera
    • Chat with stoffera
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    stoffera

    @stoffera

    20
    Reputation
    151
    Posts
    952
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website openmono.com Location Copenhagen Age 33

    stoffera Follow
    administrators

    Posts made by stoffera

    • RE: Installation issue on Mac OS 10.9.5

      hi @renaud I can't seem to make sense of why your python installation will not instal pyserial.

      From the output you provided:

      Reading http://pypi.python.org/simple/pyserial/
      

      The link works - so easy_install should be able to find the package.

      Well, perhaps you need to upgrade from Mavericks to something newer - or you could try to install pyserial manually here: Pyserial

      posted in Issues & Troubleshooting
      stoffera
    • RE: Installation issue on Mac OS 10.9.5

      @renaud said in Installation issue on Mac OS 10.9.5:

      Hi @stoffera,
      Easy_install is not installed: command not found :((

      I am a bit confused, now easy_install are present? Can you do a:

      $ sudo easy_install pyserial
      

      (skip the -U that I included in an earlier post - also you need to be sudo)

      posted in Issues & Troubleshooting
      stoffera
    • RE: Installation issue on Mac OS 10.9.5

      @renaud sorry about the late reply - apparantly my setup reading RSS with ifttt and forwarding notification does not work properly :-/

      Do you have python installed? Try:

      $ python --version
      

      If yes, then then see if pip is installed. (pip is yet another package manager for python)

      $ pip install pyserial
      

      (You might need to be root)

      posted in Issues & Troubleshooting
      stoffera
    • RE: Installation issue on Mac OS 10.9.5

      Hi @renaud,

      The installation fails when it tries to install a python package to enable serial port communication. Our monomake tool uses this python package to trigger a reset of Mono when it you upload new application to it.

      The caused might be a hiccup in the network, so try again (if you have not already). Another reason that I can think of is that the version of Python included in MacOS 10.9.5 is no longer supported by PyPi or easy_install.

      Could you try to run this command in the terminal app:

      $ easy_install --version
      

      It should respond with something like this:

      setuptools 36.0.1 from /usr/local/lib/python2.7/site-packages (Python 2.7)
      

      Install command

      You can also try to the run the command (from the Terminal.app) the installer package runs, that causes the fault:

      $ easy_install -U pyserial
      
      posted in Issues & Troubleshooting
      stoffera
    • RE: Mono TFT Display

      Hi @james-a-shepard I share your wish for a capacitive display. We would also really have liked a capacitive display. However, the price for a capacitive display to use in Mono was too high for our price tag.

      When we got the Kickstarter funding, we had a lot of talk and worked to find a reasonable priced capacitive display. Unfortunately there were no good options. So we had to go with resistive.

      I hope you will still be able to achieve your planned ideas - even though the display is resistive. Can I ask what your plans are? Maybe I can help answering any questions, that arise.

      Happy hacking :-)

      posted in Issues & Troubleshooting
      stoffera
    • RE: HTTP GET Request Client

      Hi @nicolai I have a complete solution pasted below.

      This code snippet is Arduino code, and does:

      1. Setup UI views for debug console and clock text label
      2. Setup a refresh timer for the clock text label
      3. Initialize wifi (insert your own access point data)
      4. In wifiReady the HTTP request is initialized, insert your own API Key in the URL
      5. In dataReady the http response is parsed with e regular expression
      6. Convert the unix timestamp to a Lib C broken down time
      7. Convert the time to mono's DateTime object
      8. Set the systems datetime
      #include <mono.h>
      
      mono::io::Wifi *wifi = 0;
      mono::network::HttpClient *client = 0;
      mono::ui::ConsoleView<176,110> *console;
      mono::ui::TextLabelView *clockLbl;
      mono::Timer *tim;
      
      void setup() {
        // init console view
        console = new mono::ui::ConsoleView<176,110>();
        console->show();
        
        // init clock label
        clockLbl = new mono::ui::TextLabelView(mono::geo::Rect(10,120,156,45), "-");
        clockLbl->setAlignment(mono::ui::TextLabelView::ALIGN_CENTER);
        clockLbl->show();
        tim = new mono::Timer(999);
        tim->setCallback(&updateClock);
        updateClock();
        tim->start();
        
        // start wifi
        wifi = new mono::io::Wifi("YOUR_SSID_HERE", "YOUR_PASSPHRASE_HERE");
        wifi->setConnectedCallback(&wifiReady);
        
        console->WriteLine("Connecting wifi...");
        wifi->connect();
      }
      
      void updateClock() {
        // repaint the clock label
        clockLbl->setText(mono::String::Format("%s\n%s", mono::DateTime::now().toTimeString()(), DateTime::now().toDateString()()));
        
      }
      
      void wifiReady() {
        if (client == 0) {
          delete client;
        }
      
        // fetch the time stamp from the HTTP API
        console->WriteLine("http fetch...");
        client = new mono::network::HttpClient("http://api.timezonedb.com/v2/get-time-zone?key=YOUR_API_KEY_HERE&format=json&zone=CEST&by=zone&fields=timestamp");
        client->setDataReadyCallback(&dataReady);
      }
      
      void dataReady(const mono::network::HttpClient::HttpResponseData &data) {
        // debug print the received data
        console->WriteLine(mono::String::Format("--> %s",data.bodyChunk()));
      
        // use a regular expression to extract the timestamp from the JSON
        mono::Regex timeReg("\"timestamp\":([0-9]+)");
        mono::Regex::Capture caps[1];
      
        // see if there is a match
        if (timeReg.Match(data.bodyChunk, caps, 1)) {
          //extract the timestamp as a string
          mono::String timeStr = timeReg.Value(caps[0]);
      
          // convert the string to a Lib C time_t
          time_t utime;
          sscanf(timeStr(), "%li", &utime);
          console->WriteLine(mono::String::Format("Parsed %li", utime));
          // convert to a Lib C brokendown time structure
          struct tm *broken = localtime(&utime);
      
          // create a mono DateTime object from the brokendown time
          mono::DateTime time(broken, true);
          console->WriteLine(time.toString());
      
          // set the system clock from the DateTime
          mono::DateTime::setSystemDateTime(time);
          clockLbl->setText(mono::display::GreenColor);
        }
      }
      
      void loop() {
        // Leave this empty
      }
      

      0_1508489442508_IMG_2916.jpg

      posted in Arduino
      stoffera
    • RE: Linux support

      Hi @anders-jackson, we have support for Debian/Ubuntu in our own SDK. However, Arduino IDE's board manager only copies files to a directory - which is not enough on Linux. It also needs to set UDEV rules for the USB to work.

      Therefore we do not have an Arduino package for Ubuntu/Debian. Can you use our standard toolchain instead?: http://developer.openmono.com/en/latest/getting-started/install.html

      posted in Arduino
      stoffera
    • RE: What editor do you use?

      @malaire does Geany use anything similar to Sublime Text config files?

      I am thinking about adding support for these files in monomake. In Sublime Text the project json config seems to be pretty generic.

      posted in General Discussion
      stoffera
    • What editor do you use?

      Hi all,

      I would like to know about what kind of editor you guys use. My idea is to prioritize better support for the popular editors in monomake. So it would be nice to know about what editors are: your favorite text editor?.

      So far, I have added (little) support for Atom, mainly because it was somewhat easy. However, what code editors do you like to use?

      (Note that we would lean towards cross-platform editors, to easy the integration efforts.)

      posted in General Discussion
      stoffera
    • RE: Monomake doesn't recognize Atom

      said in Monomake doesn't recognize Atom:

      What can I do?

      For Monomake to know about the existence of Atom, you must have installed the Atom Shell Commands. This enables mono to check whether Atom is installed by issuing the command line:

      $ which atom
      

      On unix system, that is. On windows a similar (yet different) command is used.

      posted in Issues & Troubleshooting
      stoffera