Mod Help

This topic contains 9 replies, has 4 voices, and was last updated by  Gwenel 1 week ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #16117

    DaY
    Participant

    Any one know why i cant make this work as a module? just keeps saying cant find base interface

     

    i have it in a folder called oak and a json file like so.

     

    I just want to put a few interfaces into one file so i can just include it in all my projects.

    #16118

    Danilo
    Participant

    The folder should be “/modules/baseinterface” and the filename “baseinterface.monkey2” if you want to #Import “<baseinterface>”.

    #16119

    DaY
    Participant

    Ah cool thanks.

    #16120

    DaY
    Participant

    Also how easy is it to port monkey code to m2? as i notice a book on monkey that might be easy enough to use if it easly portable.

    #16121

    Danilo
    Participant

    Just my personal opinion: I don’t think a Monkey-X book is of any help with Monkey2.

    The modules are completely different, in my opinion.

    #16122

    DaY
    Participant

    One more thing lol

     

    Is there any way to interact with serial/com ports? I have a aduino robot and i wanted to read in from the Sensor to make an old school sonar effect(think das boat) I dont need to wright to my aduino as thats all done in c, I just need to read in the data so i can plot the senser data.

    #16123

    abakobo
    Participant

    I suppose you have to read tru your arduino drivers? There is no specific serial port thing in monkey2 AFAIK. But everything that can be donne in C can be imported into Monkey2 (c++ might need some glue/wrapping).
    If you want some help in calling arduino with monkey2. I’ll be glad to help as I always wanted to play with an arduino. I don’t own one though, but I want to own one anyway.
    If you show some C code that works I probably can help.

    #16124

    DaY
    Participant

    https://www.ottodiy.com/ its him!

     

    https://github.com/OttoDIY all the code is there it easy cheap and a damn robot! lol

     

    now you comunicate using com/serial all i need is code to open the port and to grab the out put data and convert to usable m2.

    BlitzMax has bah.serial so i might check that as if it works in BM should be able to import the c/c++ code.

    #16126

    abakobo
    Participant

    I can see some cross platform serial libraries so it should be doable. But the bmx serial package could be event better!?

    https://github.com/wjwwood/serial

    https://sigrok.org/api/libserialport/unstable/index.html

    #16127

    Gwenel
    Participant

    Another way might be to use the web platform, then you might use Chrome’s API to access the Serial port.

    https://developer.chrome.com/apps/serial

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.