Würde ich machen , wenns nicht für was anderes gebraucht wird.
Vielleicht ist es schneller und einfacher ein neues Image auf die Karte zu spielen ?
Weiß ja nicht was du sonst noch alles installiert hast.
Würde ich machen , wenns nicht für was anderes gebraucht wird.
Vielleicht ist es schneller und einfacher ein neues Image auf die Karte zu spielen ?
Weiß ja nicht was du sonst noch alles installiert hast.
Gute Frage jetzt , habe das ganze auf einen Zero gemacht , ich meine die zwei Scripte waren ohne alles.
Schmeiss mal bitte alle anderen Scripte runter und nimm nur das aus der 7zip Datei., hatte mit den Adafruit Gedöns glaube ich auch Ärger, weiß es aber nicht mehr so geanu.
Naja Motor direkt an PCA9685 geht nicht , dafür fehlt die Leistung. Ich würde hinter dem PCA9685 noch Modellbaufahrtenregler setzen , die die Motoren ansteuern.
Hab ich mal so ausbropiert an meinen Fahrzeug , hat auch geklappt ,habs aber wieder abgebaut, war zuviel Kabelsalat.
Habe mir gerade mal das Bild angeschaut. Sehe ich das richtig das du die Stromversorgung über den LM298N zum PCA9685 machst ?
Schliess den PCA9685 mal direkt alleine an die Stromversorgung an siehe Doku-pdf ,Abbildung ist die andere Platine aber Belegung bleibt gleich, ich habe auch deine Platine, nach der Doku erfolgreich funktionsfähig verkabelt.
Ansonsten zeichne bitte mal einen Verkabelungsplan , so wie es verkabelt ist.
Wo nimmst du die Info Steppermotoren her ?
Auf dem Bild ist doch ein Servo an dem PCA9685 angesteckt.
Versuchs mal mit dem Listing
# Simple demo of of the PCA9685 PWM servo/LED controller library.
# This will move channel 0 from min to max position repeatedly.
# Author: Tony DiCola
# License: Public Domain
from __future__ import division
import time
# Import the PCA9685 module.
import PCA9685
# Uncomment to enable debug output.
#import logging
#logging.basicConfig(level=logging.DEBUG)
# Initialise the PCA9685 using the default address (0x40).
pwm = PCA9685.PCA9685()
# Alternatively specify a different address and/or bus:
#pwm = Adafruit_PCA9685.PCA9685(address=0x41, busnum=2)
# Configure min and max servo pulse lengths
servo_min = 150 # Min pulse length out of 4096
servo_max = 600 # Max pulse length out of 4096
# Set frequency to 60hz, good for servos.
pwm.set_pwm_freq(60)
print('Moving servo on channel 0, press Ctrl-C to quit...')
while True:
# Move servo on channel O between extremes.
pwm.set_pwm(2, 0, servo_min)
time.sleep(10)
pwm.set_pwm(2, 0, servo_max)
time.sleep(10)
Alles anzeigen
Import Datei PCA9685:
# Copyright (c) 2016 Adafruit Industries
# Author: Tony DiCola
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from __future__ import division
import logging
import time
import math
# Registers/etc:
PCA9685_ADDRESS = 0x40
MODE1 = 0x00
MODE2 = 0x01
SUBADR1 = 0x02
SUBADR2 = 0x03
SUBADR3 = 0x04
PRESCALE = 0xFE
LED0_ON_L = 0x06
LED0_ON_H = 0x07
LED0_OFF_L = 0x08
LED0_OFF_H = 0x09
ALL_LED_ON_L = 0xFA
ALL_LED_ON_H = 0xFB
ALL_LED_OFF_L = 0xFC
ALL_LED_OFF_H = 0xFD
# Bits:
RESTART = 0x80
SLEEP = 0x10
ALLCALL = 0x01
INVRT = 0x10
OUTDRV = 0x04
logger = logging.getLogger(__name__)
def software_reset(i2c=None, **kwargs):
"""Sends a software reset (SWRST) command to all servo drivers on the bus."""
# Setup I2C interface for device 0x00 to talk to all of them.
if i2c is None:
import Adafruit_GPIO.I2C as I2C
i2c = I2C
self._device = i2c.get_i2c_device(0x00, **kwargs)
self._device.writeRaw8(0x06) # SWRST
class PCA9685(object):
"""PCA9685 PWM LED/servo controller."""
def __init__(self, address=PCA9685_ADDRESS, i2c=None, **kwargs):
"""Initialize the PCA9685."""
# Setup I2C interface for the device.
if i2c is None:
import Adafruit_GPIO.I2C as I2C
i2c = I2C
self._device = i2c.get_i2c_device(address, **kwargs)
self.set_all_pwm(0, 0)
self._device.write8(MODE2, OUTDRV)
self._device.write8(MODE1, ALLCALL)
time.sleep(0.005) # wait for oscillator
mode1 = self._device.readU8(MODE1)
mode1 = mode1 & ~SLEEP # wake up (reset sleep)
self._device.write8(MODE1, mode1)
time.sleep(0.005) # wait for oscillator
def set_pwm_freq(self, freq_hz):
"""Set the PWM frequency to the provided value in hertz."""
prescaleval = 25000000.0 # 25MHz
prescaleval /= 4096.0 # 12-bit
prescaleval /= float(freq_hz)
prescaleval -= 1.0
logger.debug('Setting PWM frequency to {0} Hz'.format(freq_hz))
logger.debug('Estimated pre-scale: {0}'.format(prescaleval))
prescale = int(math.floor(prescaleval + 0.5))
logger.debug('Final pre-scale: {0}'.format(prescale))
oldmode = self._device.readU8(MODE1);
newmode = (oldmode & 0x7F) | 0x10 # sleep
self._device.write8(MODE1, newmode) # go to sleep
self._device.write8(PRESCALE, prescale)
self._device.write8(MODE1, oldmode)
time.sleep(0.005)
self._device.write8(MODE1, oldmode | 0x80)
def set_pwm(self, channel, on, off):
"""Sets a single PWM channel."""
self._device.write8(LED0_ON_L+4*channel, on & 0xFF)
self._device.write8(LED0_ON_H+4*channel, on >> 8)
self._device.write8(LED0_OFF_L+4*channel, off & 0xFF)
self._device.write8(LED0_OFF_H+4*channel, off >> 8)
def set_all_pwm(self, on, off):
"""Sets all PWM channels."""
self._device.write8(ALL_LED_ON_L, on & 0xFF)
self._device.write8(ALL_LED_ON_H, on >> 8)
self._device.write8(ALL_LED_OFF_L, off & 0xFF)
self._device.write8(ALL_LED_OFF_H, off >> 8)
Alles anzeigen
Bei mir hat das mit dem Code geklappt, ansonsten Verkabelung überprüfen.
Leider bekomme ich es mit den Angaben von der Github Seite auch nicht zum Laufen.
Bitte zeige die ganze Datei (config.js?) im CodeBlock , sonst ist ein Zusammenhang schwer zu erkennen.
Haben die 24 V Spannung am Mikroschalter der Tür einen besonderen Grund ?
Ansonsten könntest du den Mikroschalter auch am Pi anschließen .
Dann könntest du nach diesen Beispiel ein kleines Programm schreiben das die Zeiten in eine kleine sqlLite Datenbak einträgt.
https://gpiozero.readthedocs.io/en/stable/recipes.html#button
Welches Modul genau hast du schon ausprobiert ? bitte den genauen Link zu Github.com
Unter SolarEdge finde ich mehrere Module.
Damit ich das auch ausprobieren kann und evtl ein anderes suchen kann.
Ein SolarEdge Konto hast du ja , oder ?
Wie schon geschrieben dann die Zugsangsdaten bitte nur per Private Konversation .
Muss es unbedingt dieses Modul sein?
Ansonsten versuche mal ein anderes Modul : https://github.com/search?q=mmm+solar
Habe leider keine Solaranlage , sonst hätte ich die schon ausprobiert.
Du hast private Post ,oben die zwei Sprechblasen.
Sehe gerade noch einen Fehler in Beitrag #9 Zeile 49 . Nimm mal das Komma am Ende weg . Als Vergleich Beitrag #9 Zeile 85 und Zeile 97.
Dein Komma in Zeile 115 ist auch in der Original config.js.sample an der Stelle vorhanden.
Das ein Modul nicht läuft hatte ich auch schon, dann lief bei mir aber der teil bis zum fraglichen Modul.
Keine Ahnung, (ich habe Null Ahnung von Javascript), bei mir war es so, das es genau stimmen musste.
Bitte überprüfe die Einrückungen Zeile 44-52.
Ich habs mal angepasst:
/* Magic Mirror Config Sample
*
* By Michael Teeuw https://michaelteeuw.nl
* MIT Licensed.
*
* For more information on how you can configure this file
* see https://docs.magicmirror.builders/getting-started/configuration.html#general
* and https://docs.magicmirror.builders/modules/configuration.html
*/
let config = {
address: "localhost", // Address to listen on, can be:
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
// - another specific IPv4/6 to listen on a specific interface
// - "0.0.0.0", "::" to listen on any interface
// Default, when address config is left out or empty, is "localhost"
port: 8080,
basePath: "/", // The URL path where MagicMirror is hosted. If you are using a Reverse proxy
// you must set the sub path here. basePath must end with a /
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
useHttps: false, // Support HTTPS or not, default "false" will use HTTP
httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
language: "de",
locale: "de-DE",
logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
timeFormat: 24,
units: "metric",
// serverOnly: true/false/"local" ,
// local for armv6l processors, default
// starts serveronly and then starts chrome browser
// false, default for all NON-armv6l devices
// true, force serveronly mode, because you want to.. no UI on this device
modules: [
{
module: "alert",
},
{
module: "MMM-SolarEdge",
position: "bottom_left",
config: {
apiKey: "################################", // Requires your own API Key
siteId: "12345", // SolarEdge site ID
}
},
{
module: "updatenotification",
position: "top_bar"
},
{
module: "clock",
position: "top_left"
},
{
module: "calendar",
header: "Familienkalender",
position: "top_left",
config: {
calendars: [
{
symbol: "calendar-check",
url: "X"
}
]
}
},
{
module: "compliments",
position: "lower_third"
},
{
module: "weather",
position: "top_right",
config: {
weatherProvider: "openweathermap",
type: "current",
location: "X",
locationID: "X", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
apiKey: "X"
}
},
{
module: "weather",
position: "top_right",
header: "Weather Forecast",
config: {
weatherProvider: "openweathermap",
type: "forecast",
location: "",
locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
apiKey: ""
}
},
{
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
title: "Tagesschau",
url: "http://www.tagesschau.de/xml/rss2"
}
],
showSourceTitle: true,
showPublishDate: true,
broadcastNewsFeeds: true,
broadcastNewsUpdates: true
}
},
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}
Alles anzeigen
Probiers mal aus.
Dürfte ein Fehler sein, bei mir ist er nicht , auch nicht in der Original Config.js.sample Datei.
Die Einrückungen Zeile 41-48 stimmen nicht , müssen weiter nach rechts, unter den anderen, das ist wichtig.
Ich würde bei den Zeilen 42 und 43 auch Anführungszeichen nehmen, statt einfache.
Zeige doch bitte mal die config.js von MagicMirror im Code Block. (</> dritte Symbol von rechts)
Bei mir steht im Abschnitt
[all]
hdmi_cvt 800 480 60 6 0 0 0
für ein 5 '' Display mit der Auflösung 800x480 bei 60Hz
Komplette config.txt im Anhang
Siehe auch hier http://wiki.sunfounder.cc/index.php?titl…or_Raspberry_Pi
@Alternative 3: Ich habe mir ein Lagerfeuer auf Stick heruntergeladen. Wie kann ich das mit dem Pi auf dem Fernseher anzeigen lassen?
Wenn du das Lagerfeuer auf dem Stick hast , Stick am Fernseher einstecken und abspielen lassen.
Geht bei mir ohne Pi.
Hast du über ' Raspberry-Symbol > Einstellungen > Raspberry-Pi-Konfiguration > Schnittstellen ' auch den Eindraht-Bus eingeschaltet?