Enable i2c on raspberry pi Ubuntu





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I'm trying to enable i2c on my raspberry pi 3B running Ubuntu 18.04 server for arm64. The standard method (using raspi-config) fails because the command cannot be found nor installed (unable to locate package raspi-config). I realize raspi-config is just a convenience feature and theoretically I could edit some files by hand, couldn't find any tutorials for doing this on Ubuntu 18.04. Is there a guide somewhere to enable i2c on a pi 3 running Ubuntu 18.04 server?










share|improve this question























  • Possibly helpful - wiki.ubuntu.com/ARM/RaspberryPi , or raspberrypi.stackexchange.com/questions/61905/…

    – guiverc
    Mar 31 at 4:29













  • thank you, but the second one says to use rapi-config, while the first has mention of i2c but doesn't seem to be a compete guide for enabling it.

    – anvoice
    Mar 31 at 4:40


















0















I'm trying to enable i2c on my raspberry pi 3B running Ubuntu 18.04 server for arm64. The standard method (using raspi-config) fails because the command cannot be found nor installed (unable to locate package raspi-config). I realize raspi-config is just a convenience feature and theoretically I could edit some files by hand, couldn't find any tutorials for doing this on Ubuntu 18.04. Is there a guide somewhere to enable i2c on a pi 3 running Ubuntu 18.04 server?










share|improve this question























  • Possibly helpful - wiki.ubuntu.com/ARM/RaspberryPi , or raspberrypi.stackexchange.com/questions/61905/…

    – guiverc
    Mar 31 at 4:29













  • thank you, but the second one says to use rapi-config, while the first has mention of i2c but doesn't seem to be a compete guide for enabling it.

    – anvoice
    Mar 31 at 4:40














0












0








0








I'm trying to enable i2c on my raspberry pi 3B running Ubuntu 18.04 server for arm64. The standard method (using raspi-config) fails because the command cannot be found nor installed (unable to locate package raspi-config). I realize raspi-config is just a convenience feature and theoretically I could edit some files by hand, couldn't find any tutorials for doing this on Ubuntu 18.04. Is there a guide somewhere to enable i2c on a pi 3 running Ubuntu 18.04 server?










share|improve this question














I'm trying to enable i2c on my raspberry pi 3B running Ubuntu 18.04 server for arm64. The standard method (using raspi-config) fails because the command cannot be found nor installed (unable to locate package raspi-config). I realize raspi-config is just a convenience feature and theoretically I could edit some files by hand, couldn't find any tutorials for doing this on Ubuntu 18.04. Is there a guide somewhere to enable i2c on a pi 3 running Ubuntu 18.04 server?







18.04 raspberrypi






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 31 at 4:27









anvoiceanvoice

1419




1419













  • Possibly helpful - wiki.ubuntu.com/ARM/RaspberryPi , or raspberrypi.stackexchange.com/questions/61905/…

    – guiverc
    Mar 31 at 4:29













  • thank you, but the second one says to use rapi-config, while the first has mention of i2c but doesn't seem to be a compete guide for enabling it.

    – anvoice
    Mar 31 at 4:40



















  • Possibly helpful - wiki.ubuntu.com/ARM/RaspberryPi , or raspberrypi.stackexchange.com/questions/61905/…

    – guiverc
    Mar 31 at 4:29













  • thank you, but the second one says to use rapi-config, while the first has mention of i2c but doesn't seem to be a compete guide for enabling it.

    – anvoice
    Mar 31 at 4:40

















Possibly helpful - wiki.ubuntu.com/ARM/RaspberryPi , or raspberrypi.stackexchange.com/questions/61905/…

– guiverc
Mar 31 at 4:29







Possibly helpful - wiki.ubuntu.com/ARM/RaspberryPi , or raspberrypi.stackexchange.com/questions/61905/…

– guiverc
Mar 31 at 4:29















thank you, but the second one says to use rapi-config, while the first has mention of i2c but doesn't seem to be a compete guide for enabling it.

– anvoice
Mar 31 at 4:40





thank you, but the second one says to use rapi-config, while the first has mention of i2c but doesn't seem to be a compete guide for enabling it.

– anvoice
Mar 31 at 4:40










1 Answer
1






active

oldest

votes


















1














Here is how I managed to install raspi-config on the Pi 3 B running Ubuntu 18.04 server for ARM64:



wget https://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20160527_all.deb -P /tmp
apt-get install libnewt0.52 whiptail parted triggerhappy lua5.1 alsa-utils -y
apt-get install -fy
dpkg -i /tmp/raspi-config_20160527_all.deb


After these commands, raspi-config (albeit seemingly an older version) was installed on the Pi. It does give a warning that it's only meant to work on Raspbian, but it seems to have done the job for me. After installing raspi-config, I had to mount the boot partition:



sudo mount /dev/mmcblk0p1 /boot


And then use sudo raspi-config, following the prompts to enable i2c (in Advanced Settings->i2c). Then ls /dev/i2c* responds with /dev/i2c-1, indicating that i2c is enabled. I then managed to detect my i2C device using sudo i2cdetect -y 1. I found the instructions for installing raspi-config in a script here.






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1130052%2fenable-i2c-on-raspberry-pi-ubuntu%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Here is how I managed to install raspi-config on the Pi 3 B running Ubuntu 18.04 server for ARM64:



    wget https://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20160527_all.deb -P /tmp
    apt-get install libnewt0.52 whiptail parted triggerhappy lua5.1 alsa-utils -y
    apt-get install -fy
    dpkg -i /tmp/raspi-config_20160527_all.deb


    After these commands, raspi-config (albeit seemingly an older version) was installed on the Pi. It does give a warning that it's only meant to work on Raspbian, but it seems to have done the job for me. After installing raspi-config, I had to mount the boot partition:



    sudo mount /dev/mmcblk0p1 /boot


    And then use sudo raspi-config, following the prompts to enable i2c (in Advanced Settings->i2c). Then ls /dev/i2c* responds with /dev/i2c-1, indicating that i2c is enabled. I then managed to detect my i2C device using sudo i2cdetect -y 1. I found the instructions for installing raspi-config in a script here.






    share|improve this answer




























      1














      Here is how I managed to install raspi-config on the Pi 3 B running Ubuntu 18.04 server for ARM64:



      wget https://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20160527_all.deb -P /tmp
      apt-get install libnewt0.52 whiptail parted triggerhappy lua5.1 alsa-utils -y
      apt-get install -fy
      dpkg -i /tmp/raspi-config_20160527_all.deb


      After these commands, raspi-config (albeit seemingly an older version) was installed on the Pi. It does give a warning that it's only meant to work on Raspbian, but it seems to have done the job for me. After installing raspi-config, I had to mount the boot partition:



      sudo mount /dev/mmcblk0p1 /boot


      And then use sudo raspi-config, following the prompts to enable i2c (in Advanced Settings->i2c). Then ls /dev/i2c* responds with /dev/i2c-1, indicating that i2c is enabled. I then managed to detect my i2C device using sudo i2cdetect -y 1. I found the instructions for installing raspi-config in a script here.






      share|improve this answer


























        1












        1








        1







        Here is how I managed to install raspi-config on the Pi 3 B running Ubuntu 18.04 server for ARM64:



        wget https://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20160527_all.deb -P /tmp
        apt-get install libnewt0.52 whiptail parted triggerhappy lua5.1 alsa-utils -y
        apt-get install -fy
        dpkg -i /tmp/raspi-config_20160527_all.deb


        After these commands, raspi-config (albeit seemingly an older version) was installed on the Pi. It does give a warning that it's only meant to work on Raspbian, but it seems to have done the job for me. After installing raspi-config, I had to mount the boot partition:



        sudo mount /dev/mmcblk0p1 /boot


        And then use sudo raspi-config, following the prompts to enable i2c (in Advanced Settings->i2c). Then ls /dev/i2c* responds with /dev/i2c-1, indicating that i2c is enabled. I then managed to detect my i2C device using sudo i2cdetect -y 1. I found the instructions for installing raspi-config in a script here.






        share|improve this answer













        Here is how I managed to install raspi-config on the Pi 3 B running Ubuntu 18.04 server for ARM64:



        wget https://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20160527_all.deb -P /tmp
        apt-get install libnewt0.52 whiptail parted triggerhappy lua5.1 alsa-utils -y
        apt-get install -fy
        dpkg -i /tmp/raspi-config_20160527_all.deb


        After these commands, raspi-config (albeit seemingly an older version) was installed on the Pi. It does give a warning that it's only meant to work on Raspbian, but it seems to have done the job for me. After installing raspi-config, I had to mount the boot partition:



        sudo mount /dev/mmcblk0p1 /boot


        And then use sudo raspi-config, following the prompts to enable i2c (in Advanced Settings->i2c). Then ls /dev/i2c* responds with /dev/i2c-1, indicating that i2c is enabled. I then managed to detect my i2C device using sudo i2cdetect -y 1. I found the instructions for installing raspi-config in a script here.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 31 at 6:49









        anvoiceanvoice

        1419




        1419






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1130052%2fenable-i2c-on-raspberry-pi-ubuntu%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            數位音樂下載

            When can things happen in Etherscan, such as the picture below?

            格利澤436b