Programs compatible with Raspberry Pi 3 but not with Pi Zero? - raspberry-pi

I am trying to control an epaper display with a raspberry pi zero. I am following this great tutorial: https://beenje.github.io/blog/posts/my-lego-macintosh-classic-with-raspberry-pi-and-e-paper-display/ He did work with a Pi Zero as well.
I got the ansible playbook running which would get me a clock on the display. But the display does not change. If I'm ejecting the SD card and putting it into a Pi 3 that I got at home, the clock is running perfectly on the epaper display.
Because I thought that something is wrong with the pins of my pi zero, I ordered a new Pi. But it's all the same. I've used different power supplies as well. To change the power supply port of the Pi Zero hasn't helped either.
When I tried a different approach over a docker container that's deployed in the cloud (resin.io) the display has changed. Everything worked.
How is it possible that all the same software is running perfectly on a Pi 3 and on a Pi Zero, it is not working.
Especially since it is working for Benjamin - the author of the tutorial I'm following.
I am on Raspbian Stretch because Benjamin has used it, too.
Edit: I'm using a Pi Zero with presoldered header
Thank you!

I found out, that the repository of Embedded Artists for the ePaper Display did break support for Pi Zero W as it added support for Pi 3 with the commit 282e88f.
Currently, if you want to use the repository on the Pi zero you have to use commit 9b7accc68,

Related

Setting trainer resistance using Swifty Sensors and Wahoo's cycling power service extension

I'm using the SwiftySensors CocoaPod to connect to a Wahoo Smart Trainer. It's advertising CyclingPowerService and DeviceInformationService. I've been able to get speed and power values without issue. Wahoo apparently extended the CyclingPowerService standard to allow setting resistance via that service instead of the Fitness Machine Control service.
https://github.com/codeinversion/sensors-swift links out to another Github page dealing with that extension, but that link is broken.
My question is: how should I go about setting the trainer's resistance? Wahoo's app can do it, so the machine is equipped for it. This is the only time I need to change the trainer's settings. Otherwise, I'm just reading sent information and SwiftySensors works great.
I've referenced the following post: Writing BLE to Cycling Control Point - Adding Resistance. Someone there said using CyclingPowerService to set resistance was possible without offering any guidance. I'm not very experienced with Bluetooth, so any information would be great!
Thank you Jordan. That was the answer. The broken link I referenced must have been pointing to the following repo: https://github.com/WahooFitness/sensors-swift-trainers
The following instructions assume that you're already able to connect to the trainer to receive data from it, like speed and power, using the SwiftySensors CocoaPod and the CyclingPowerService. Using the repo linked above, I was able to set the resistance to the Wahoo Snap trainer. Note that after you install that new repo, before you start scanning for sensors to connect to, you need to call
CyclingPowerService.WahooTrainer.activate()
From there, you set the resistance with
if let wahooTrainer = cyclingSpeedService.wahooTrainer {
wahooTrainer.setResistanceMode(resistance: 0.5)
}
The resistance is set using percentages. The value for resistance will be a Float, somewhere between 0 and 1.

Matching/correcting CRC32 Checksum for modified router firmware

I've got a Netgear D8500 router which apparently has a wireless IC that doesn't quite match up to the supplied driver firmware. Thus, OOB it works, however whenever there's a firmware update it completely bricks the router because the firmware driver for the WLan IC doesn't take into account this slight IC variation. Very common issue and the router got mothballed.
I'm not entirely clued up on firmware, software, coding etc so please excuse my ignorance, afterall I've come here for help/advice/to learn.
The driver in question is contained within the dhd.ko file in the linux kernel directory in the firmware. Simply put, I've extracted the driver dhd.ko file of a known working firmware for an exactly similar device and replaced the same file in a genuine Netgear firwmare.
The issue is, when it comes to flashing, it fails the CRC32 checksum because obviously, it doesn't match up to the original anymore.
How do I correct this?
EDIT: For a more visual guide, please see the picture here. The top half is of the PUTTY serial terminal after flashing the modified firmware, the bottom half is of 7Zip CRC32 checksum so I think it's an embedded CRC. Possibly in the header?

Connecting a device to an account

So the title sounds stupid. I'm not really sure how to really word it, but I want someone to help guide me on what to look for. Little back story first so I'm working on a Raspberry Pi project that involves using an LTE service currently I have a dashboard running on a AWS EC2 web server with a simple user working user login.
I have a raspberry pi that is directly pointed to the dashboard/account via an IP address. I want to know how to do something like giving a device an ID and having it connect to an account. So for example with Nest products you have the QR code on the camera you take a photo and that devices get applied to your account.
Is this even possible with Raspberry Pi(I'm sure anything possible, but is it feasible? If so what should I look into or learn how to do such thing. I know its not something that can be answered in a short paragraph just looking for some guidance.
Right, thanks. Well, I think you need to program this into the pi server app. So currently your Pi is reading a sensor and sending this data to the web server, right? I suppose you have a daemon running, taking readings, and doing an API REST call to the server backend, correct? So what you want is to have a unique code for each pi, sent with the API call, and then on your DB server side,you store all readings related to their unique code.
You don't need to pre-validate this code, there are GUID generators that will create a number for you, guaranteed to be unique for all eternity, so on the PI, you set it up once, to create the PI's code, and use it from then on. Now, server side, then associating a device with a user is a matter of choosing the data associated with a given gui. And I think that covers it.
You can improve on this basic idea by giving it more thought, but I think it's a good starting point! Do let me know if I can help you with anything else!

DH-11 Sensor on a Raspberry Pi

I am trying to make my DH-11 sensor work on my raspberry pi but I have not succeeded after several attempts. I followed the following tutorial from Adafruit:
https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging
My attempts were unsuccessful. I just do not get any feedback whatsoever from the sensor. I know that both my DH11/DH22 sensors do work because I do read data from them if I do the same circuit using my arduinos and run a script. I also don't think my raspberry's GPIOs are damaged in any way since I tried with like 5 and I didn't get any data.
I am not trying to log stuff to a google doc like the tutorial does, I am just trying to read data from the sensor using the raspberry.. I have plans to log the data in a server an access it remotely... But for that I have to get readings from the sensor first.
Now, has anyone achieved this? Reading data from a DH11/DH22 in the raspberry pi? If so, could you tell me which tutorial you followed? I've been looking for some out there but it seems that Adafruit's is by far the most popular one.
Thanks for your help!
Cheers!
We just found a solution by using the following:
commenting out the blacklist as discussed here
and, doing the following as directed here:
better choice: sudo raspi-config
elect “Advanced Options”
then either “SPI” or “i2C” and enable the interfaces there
“YES” to load driver modules automatically
I found the details for setting up the DHT22 quite simple. I followed thispi.com instructions. I have had issues with the sensor itself and that may be your problem. My first one was a dud, but the second one I connected worked great.

Directly connecting two Arduino Yun boards to each other

I am trying to connect two Arduino Yun boards to each other via WIFI (make one board control a pin on the other board an vice versa) and I am having trouble making it work the way I want to.
This is where I've gotten so far:
I have two Arduino Yun boards with a simple sketch installed on each, which works fine as long as I keep the "connecting-each-other"-part out of it. It uses a potentiometer on the analog port, reads its value, maps it to the range of 0-255 an fades a LED up or down on one of the digital pins (brighter / darker) depending on the given value. Now I want to use the potentionmeter of one board to control the LED on the OTHER board.
To do that, I tried to use the REST API. I combined my sketch with the code from the "Bridge" Example Sketch, which sets up a http-client/server on the Arduino Yun (on the Linux part) allowing it to receive requests to control and read patricular pins via http.
When using the specific URL for the REST API in a browser, it works fine. For example: when I type "http://myarduino.local/arduino/digital/3/1" it sets the value of digital pin 3 to 1 (i.e. LED is switched on) --> so that's all fine
I am not sure how to continue at this point, since I dont want to control the board from a browser or app but make one Arduino Yun control another Arduino Yun directly. If I put a http request in my sketch like mentioned above via client.get and client.read (as in the example sketch) it does not work. See example code below. It doesnt have any effect nor does anything appear in the serial monitor (with the original URL "http://arduino.cc/asciilogo.txt" like in the example, the ascii code appears in the serial monitor)
HttpClient webclient;
webclient.get("http://ardu1.local/digital/3/1");
while (webclient.available()) {
char c = webclient.read();
Serial.print(c);
}
Serial.flush();
I am a beginner with Arduino Yun boards and maybe I am missing something?
Thanks for any help or pointing me in the right direction. Or if you need more information to help me with this problem, please let me know.
I found another way to connect two Arduino Yun boards directly, or as close to "directly" as it probably gets. The REST API was not the right way to go. So this is for anyone who might encounter the same "problem":
After some research I came across "Spacebrew". It's based on "websockets" and requires a server to connect the boards to each other, but it is very flexible. It's also fairly easy to setup a spacebrew server locally. It allows every client (like a Arduino Yun board) connected to the server to publish different types of data (boolean, range, value) and/or to subscribe to the published data from other devices using a simple webinterface. The good thing is, that the connection is fast and there's no waiting for the connection to be reestablished when there is data to be sent.
I used the Arduino Example Sketch "spacebrewRange" and it worked fine for me.
It also requires a few other things before it can work, but its explained on the website and in a tutorial:
http://docs.spacebrew.cc/gettingstarted/
http://de.slideshare.net/julioterra/spacebrew-server-workshop-itp
Trying to do the same, it seems, and for me it works (this bit at least :-|
I let one arduino request the URL "http://router.domain:port/arduino/key/value", using a Process which runs cURL. The receiving arduino interprets this request to set the key to the value, using a YunClient.
From the URLs in your question, it seems that you are missing the mandatory "/arduino/" component in the path name. As far as I know, this is needed to direct any requests directed at the OpenWRT stack to the arduino/Leonardo part.