Hot answers tagged

4

You can setup an access point on the RasPi so the smartphone can connect to it. There are hundreds of tutorials about this on the web, but many of them are outdated. The official Raspberry Pi web site for this you can find at Setting up a Raspberry Pi as a routed wireless access point or at Setting up a Raspberry Pi as a bridged wireless access point but ...


3

Packaged on debian based distribution: sudo apt install tldr With npm: Install a supported nodejs version: curl -sL https://deb.nodesource.com/setup_current.x | sudo bash - sudo apt install nodejs Then run: sudo npm install npm@latest -g sudo npm install tldr -g npm WARN npm npm does not support Node.js v10.23.1 npm WARN npm You should probably upgrade to ...


2

As of about April last year, it seems, NodeJS support for Armv6 moved to experimental see this thread for the RFC / discussion / reasoning etc. Armv6 is still supported and maintained on an experimental basis with all the caveats that word entails. The project is hosted at github and the binaries can be downloaded from here downloads. The site is a basic ...


2

The length of the pulse is used by the servo hardware to set the angle of the servo horn. If the length of the pulses differ then the servo will be continually shifting angle. Typically a 10 ┬Ás difference in length of pulse will result in a 1 degree difference in angle. With software timed pulses the accuracy is not very precise and can easily change by ...


2

I already installed NodeJS a few times on Raspberry Pis but always used the packages from the NodeJS download page. The great advantage is that you don't have to compile anything, just download it and you're done. The files on the NodeJS download page are always the newest LTS version. Right now it is v12.18.2 (07/21/2020) First, you have to check what CPU ...


2

There are mainly three services used for name resolution in a network, in particular together with MS Window$: DNS (Domain Name Service) the main name service all over the world, supported by any internet provider. It resolve hierarchical organized names like raspberrypi.stackexchange.com. mDNS (multicast DNS) an auto configuring name resolution service, ...


1

Try setting the default application for root to the same value as for pi: filetype=$(xdg-mime query filetype file:///home/pi/index.html) defaultapp=$(xdg-mime query default $filetype) # query as pi sudo xdg-mime default $defaultapp $filetype # set as root Alternatively, executing sudo -u pi xdg-open file:///home/pi/index.html should use the settings of ...


1

I still wondered how that could be a code issue when the code was fine on other pi's Did you have a look at the Stack Overflow Q&A that Tomir linked? Read in particular the accepted answer and the other links provided therein. The basic issue is that javascript/node.js is not the operating system, and it is the operating system it must depend on, but ...


1

setInterval is inherently not accurate (as can be seen here) Not sure what code you used, but if you are not using Date, you might want to consider it. i.e the following example will drift var displayDate = 0; // the date to be displayed setInterval(() => { displayDate++; }, 1000); And this will not: var startDate = Date.now(); // Date in MS since 1/1/...


1

You could youse Cron to pull the contents of your Github repository every minute. Set up git with the terminal and connect it to your Github Repository. You can edit the crontab like this: crontab -e. Add this line: */1 * * * * git pull. Save and Exit. Edit the file in your Repository and it should be updated on your Pi within a minute. Cron docs: https://...


1

I don't quite understand "playing music from a stream". Is it a stream like Twitch stream or is it a URL of a .mp3/.wav file? If it is the first type, could you please provide me the URL? Thanks! I'm not sure about the first type streaming. But for the second one, you can use wget to download the file and play it with omxplayer. Or you can use ...


1

It sounds like this would be a good application for Web Bluetooth. https://webbluetoothcg.github.io/web-bluetooth/ There is an overview video: https://youtu.be/X55aFMGIWvw And an overview video from Google on the topic: https://youtu.be/I3obFcCw8mk If you have Chrome Browser on your phone you can go to the URL chrome://bluetooth-internals/ and see various ...


1

Ok. This made it work: wget https://nodejs.org/dist/v8.10.0/node-v8.10.0-linux-armv6l.tar.xz cd /usr/local sudo tar xf ~/node-v8.10.0-linux-armv6l.tar.xz --strip=1 rm -rf node-v* I not sure why. Seems like the above code extracts the content in the right folder instead of doing af copy / paste


1

You need to either mock the GPIO calls or use remote GPIO. The gpiozero python library provides a "mock" pin interface so you can run GPIO code on any machine. It also provides a remote GPIO option so you can run on a PC but control the pins on a Pi on the network (this is via the pigpio daemon so you can do this from any language with a pigpio client ...


1

The Raspberry Pi has a 64 Bit ARM Cpu (but runs with a 32 Bit OS by default). So you need to make sure you build your program for ARM, 32bit.


1

There are some things mixed up with your Unit file. First of all, don't use Restart= to try to "fix" a buggy service. It never helps and it's only waste of performance and confuses the system. You must use a stable service of course and have to fix bugs on it. You want to run a service. Usually a service is staying in the background and always running. Then ...


Only top voted, non community-wiki answers of a minimum length are eligible