How do I get the state of connectors like SPI, Serial?

Posted on
  • When I use Ethernet, I plug cable, I want to get the state of SPI so that I can judge if I need to getIP() from network. Oppositely, when I unplug the cable, when I invoke code like 'eth.getIP()', system shown that I could connect to the internet, but actually it couldn't.

    So, how do I easily get the collectors states?

    If a borad have both Ethernet and GPRS, how to automatically join network? How to handle the ip method?

  • Thr 2020.02.27

    Hi @user109783, thank you for your interest in Espruino. While we understand there may be a bit of a learning curve getting started, there appears to be a bit of a mis-communication in the type of questions being asked, and the thread topic placement within the Espruino forum.

    A few days ago, the first post went unanswered within the 'Electronics' forum:

    How do I recieve the whole datas from a lora device?­343983/#comment15116095

    So, before we tie up our experienced staff possibly chasing ghosts, lets start with some basics so that we are all on the same page. okay?

    Please post the results of process.env so that we may understand the environment better. Also please include the Ethernet device and GPRS module. Also provide the link(s) to the tutorial(s) that have been attempted. Posting the current code block would help immensely.

    Should the function reference not have been discovered yet, and the results of the wifi.connect() function not provide the detail that is needed,

    it is possible we are not totally grasping what is being attempted. Forgive us if it is simply a language barrier, but rest assured we'll get started on the right track.

    Please review the bulleted list at:

    Writing an effective forum post­335009/

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

How do I get the state of connectors like SPI, Serial?

Posted by Avatar for user109783 @user109783