
photron
Administrators-
Gesamte Inhalte
3.188 -
Benutzer seit
-
Letzter Besuch
-
Tagessiege
52
Alle erstellten Inhalte von photron
-
from tinkerforge.ip_connection import IPConnection from tinkerforge.bricklet_barometer import BrickletBarometer HOST = "192.168.52.55" PORT = 4215 ipcon = IPConnection() devices = {} def cb_air_pressure(uid, air_pressure): print(f"Air Pressure ({uid}): {air_pressure / 1000} hPa") def cb_altitude(uid, altitude): print(f"Altitude ({uid}): {altitude / 100} m") def cb_enumerate(uid, connected_uid, position, hardware_version, firmware_version, device_identifier, enumeration_type): if enumeration_type == IPConnection.ENUMERATION_TYPE_DISCONNECTED: return if device_identifier == BrickletBarometer.DEVICE_IDENTIFIER: device = BrickletBarometer(uid, ipcon) device.register_callback(BrickletBarometer.CALLBACK_AIR_PRESSURE, lambda *args: cb_air_pressure(uid, *args)) device.register_callback(BrickletBarometer.CALLBACK_ALTITUDE, lambda *args: cb_altitude(uid, *args)) device.set_air_pressure_callback_period(1000) device.set_altitude_callback_period(1000) devices[uid] = device def main(): ipcon.register_callback(IPConnection.CALLBACK_ENUMERATE, cb_enumerate) ipcon.connect(HOST, PORT) ipcon.enumerate() input("Press Enter to exit\n") if __name__ == "__main__": main()
-
Port 4240 schliessen
Thema antwortete auf photrons tfRookie in: Software, Programmierung und externe Tools
Der Mesh Gateway Port kann in der aktuellen Brickd Version nicht geschlossen werden. Sorry. Ich nehme das als Feture für die nächste Version mit auf. -
outdated documentation on how to install brickd on Debian
Thema antwortete auf photrons CChris in: General Discussion
I updated the documentation. Thanks for reporting the problem. -
Wie ist dein Netzwerk eingerichtet? Fritzbox? DHCP? Statische IP-Adressen?
-
CPU Auslastung 100% mit Stepper und AnalogIn CB
Thema antwortete auf photrons MBOB in: Software, Programmierung und externe Tools
Kannst du deinen Programmcode zeigen? -
How are you creating the DLL? Are you using Visual Studio?
-
IPv6-Unterstützung sämtlicher TF-Software
Thema antwortete auf photrons sim937 in: Software, Programmierung und externe Tools
Entschudige die späte Antwort. Du bist der erste der nach IPv6 fragt in der ganzen Zeit. Ich habe den PHP Bindings und Brick Viewer IPv6 Unterstüzung hinzugefügt. Teste bitte ma die angehängten Versionen. tinkerforge_php_bindings_2_1_30_ipv6.zip brickv-2.4.22+snapshot~4bea4fb_all.deb -
So you have an old setup that is working and an identical new setup that is not working right. You could try swapping the SD cards between the Raspberry Pis. If the problem moves with the SD card then its a software problem. If the problem doesn't move with the SD card, then it has to be a difference in hardware. You could try swapping the HAT Zero Bricks between the Raspberry Pis. If the problem moves with the HAT Zero Brick then its a problem with the HAT Zero Brick.
-
This is not possible in a robust way right now. Even if the uC bindings would allow you to call the getter to reset the count in the callback, you could still lose count. The callback doesn't rseet the count, only the getter with reset_counter=true does it. If you want to use the callback ou can emultate a reset in your code by remembering the counter value from the previous callback call and subtract that from the new value.
-
Die Webservr::on() Methode erwartet jetzt, dass die Rückgabe des request.send() Aufrufs zurückgegeben wird. server.on("/phase_switcher/requested_power_history", HTTP_GET, [this](WebServerRequest request) { if (!initialized) { // ÄNDERNUG HIER return request.send(400, "text/html", "not initialized"); } const size_t buf_size = PHASE_SWITCHER_RING_BUF_SIZE * 6 + 100; char buf[buf_size] = {0}; size_t buf_written = 0; int16_t val; requested_power_history.peek(&val); // Negative values are prefilled, because the ESP was booted less than 48 hours ago. if (val < 0) buf_written += snprintf(buf + buf_written, buf_size - buf_written, "%s", "[null"); else buf_written += snprintf(buf + buf_written, buf_size - buf_written, "[%d", (int)val); for (int i = 1; i < requested_power_history.used() && requested_power_history.peek_offset(&val, i) && buf_written < buf_size; ++i) { // Negative values are prefilled, because the ESP was booted less than 48 hours ago. if (val < 0) buf_written += snprintf(buf + buf_written, buf_size - buf_written, "%s", ",null"); else buf_written += snprintf(buf + buf_written, buf_size - buf_written, ",%d", (int)val); } if (buf_written < buf_size) buf_written += snprintf(buf + buf_written, buf_size - buf_written, "%c", ']'); // ÄNDERNUG HIER return request.send(200, "application/json; charset=utf-8", buf, buf_written); });
-
Bindings: Go 2.0.14 Fix bool arrays in getters Download: Go
-
Bindings: Go 2.0.14 Bool-Arrays in Gettern repariert Download: Go
-
Go bindings 2.0.13 published. Those will just work now, without modification. You can also remove the replace line from your go.mod file again. 100 FPS is too low, you should be able to send 500 FPS and receive 1000 FPS. This example sends about 500 FPS with two CAN Bricklet 2.0 connected to form a CAN bus: #!/usr/bin/env python # -*- coding: utf-8 -*- HOST = "localhost" PORT = 4223 UID1 = "Er1" # Change XYZ to the UID of your CAN Bricklet 2.0 UID2 = "Gj8" # Change XYZ to the UID of your CAN Bricklet 2.0 from tinkerforge.ip_connection import IPConnection from tinkerforge.bricklet_can_v2 import BrickletCANV2 # Callback function for frame read callback def cb_frame_read(frame_type, identifier, data): if frame_type == BrickletCANV2.FRAME_TYPE_STANDARD_DATA: print("Frame Type: Standard Data") elif frame_type == BrickletCANV2.FRAME_TYPE_STANDARD_REMOTE: print("Frame Type: Standard Remote") elif frame_type == BrickletCANV2.FRAME_TYPE_EXTENDED_DATA: print("Frame Type: Extended Data") elif frame_type == BrickletCANV2.FRAME_TYPE_EXTENDED_REMOTE: print("Frame Type: Extended Remote") print("Identifier: " + str(identifier)) print("Data (Length: " + str(len(data)) + "): " + ", ".join(map(str, data[:min(len(data), 8)]))) print("") if __name__ == "__main__": ipcon = IPConnection() # Create IP connection can1 = BrickletCANV2(UID1, ipcon) # Create device object can2 = BrickletCANV2(UID2, ipcon) # Create device object ipcon.connect(HOST, PORT) # Connect to brickd # Don't use device before ipcon is connected # Configure transceiver for loopback mode can1.set_transceiver_configuration(1000000, 625, can1.TRANSCEIVER_MODE_NORMAL) can2.set_transceiver_configuration(1000000, 625, can2.TRANSCEIVER_MODE_NORMAL) # Register frame read callback to function cb_frame_read #can2.register_callback(can2.CALLBACK_FRAME_READ, cb_frame_read) # Enable frame read callback can2.set_frame_read_callback_configuration(True) # Write standard data frame with identifier 1742 and 3 bytes of data import time c = 0 s = time.monotonic() f = 0 while True: time.sleep(0.0001) if not can1.write_frame(can1.FRAME_TYPE_STANDARD_DATA, 1742, [42, 23, 17]): f += 1 if f % 100 == 0: print('fails', f) continue c += 1 if c % 100 == 0: n = time.monotonic() d = n - s #print('c', c, d, d / c, c / d) print('fps', c / d) input("Press key to exit\n") # Use raw_input() in Python 2 can2.set_frame_read_callback_configuration(False) ipcon.disconnect()
-
Bindings: Go 2.0.13 Fix streaming setter payload length calculation Convert to Go module Download: Go
-
Bindings: Go 2.0.13 Streaming-Setter-Payload-Längenberechnung korrigiert In Go Module umgeandelt Download: Go
-
Okay, the Go bindings are not yet adapted to go.mod, but you can do that yourself for now. Unpack the ZIP file to somwhere, doesn't matter where. Run "go mod init github.com/Tinkerforge/go-api-bindings" in the github.com/Tinkerforge/go-api-bindings directory from the unpacked ZIP file. To your go.mod file add a line like this, to tell Go where to find the module locally: replace github.com/Tinkerforge/go-api-bindings => /path/to/your/github.com/Tinkerforge/go-api-bindings
-
"pio run -e prepare" fällt jetzt auch weg. Wir haben einen Weg gefunden zusammen mit der symlinks diesen Schritt automatisch auszuführen.
-
Probleme mit dem Aussetzen der Build Umgebung in VSC
Thema antwortete auf photrons Andreas_Mainz in: WARP Charger
Wie schon gesagt ist es richtig, dass das include Verzeichnis fehlt. Ich habe dennoch ein leeres hinzugefügt, damit VSCode darüber nicht unnötig warnt. -
Probleme mit dem Aussetzen der Build Umgebung in VSC
Thema antwortete auf photrons Andreas_Mainz in: WARP Charger
Ich habe der Dokumentation jetzt noch hinzugefügt, dass Node.js und Git nicht als VSCode Extensions zu installieren sind. Die npm Warnung kannst du ignorieren. Das ist nur eine Warnung, die nicht relevant ist für die Funktion von npm. Das scheint ein internes Problem zu sein das nur die 16.16 Version betrifft. Mit 18.6 kommt die Warnung nicht. Du kannst auf 18.6 wechseln, das ist aber nicht zwingend notwendig. Wenn ich das richtig sehe musst du allerdings den Code hier runterladen: https://github.com/mattsches1/esp32-firmware/tree/phase_switcher Das was du heruntergeladen hast beinhaltet die Phasenumschatung nicht. Danke für eure Gedult. -
Probleme mit dem Aussetzen der Build Umgebung in VSC
Thema antwortete auf photrons Andreas_Mainz in: WARP Charger
Mal bitte alle Füße stillhalten... Sorry, dass das alles nicht direkt zu laufen scheint. Das funktioniert hier auch alles unter Windows 10. Das Problem ist leider, dass ich das auf einem Windows 10 getestet habe das schon verschiedene Dinge installiert hatte und daher in der Anleitung Dinge fehlen, z.B. git. Warum gerade npm fehlt ist mit unklar. Das wird mit Node.js mit installiert. Muss ich rausbekommen. Wird nachgeliefert. Ich gehe den Installationsprozess jetzt noch mal auf einem nackten Windows 10 durch. @Andreas_Mainz Deine Probleme mit der EVSE Bricklet 2.0 Firmware spielen für die ESP32 Firmware keine Rolle. Bei den Bricklets ist das etwas anders gelagert, der Entwicklungsprozess für die Bricklets war nie für Windows gedacht, funktioniert dort aber auch, ist nur schwerer einzurichten. Daher bist du da mehr gestolpert. Bei der ESP32 Firmware ist das anders gelagert. Das soll eigentlich Out-of-the-Box funktionieren. Ich arbeite daran das zu verbessern. @ThomKa Kein Grund auf Linux zu wechseln. Gib mir einen Moment, wir bekommen das hin. -
Probleme mit dem Aussetzen der Build Umgebung in VSC
Thema antwortete auf photrons Andreas_Mainz in: WARP Charger
Es fehlt dir Git. Installier mal dies hier und am besten danach Windows einmal neustarten. https://github.com/git-for-windows/git/releases/download/v2.37.1.windows.1/Git-2.37.1-64-bit.exe Das fehlte in unserer Anleitung, ich habe das korrigiert. -
Kannst du die Bricklets einzeln an einem einzelnen Master Brick (per USB am PC) testen?
-
Wie sieht der gesammte Aufbau aus? Oder sind es einfach nur Segment Display 4x7 Bricklet 2.0 und Thermal Imaging Bricklet an einem Master Brick, per USB am PC? Tritt das Problem mit der zeitweisen Auftauchen im Brick Viewer auch auf, wenn du nur jeweils ein Bricklet angeschlossen hast? Sitzt beim Thermal Imaging Bricklet das Kameramodul richtig im Sockel? Ohne Strom drauf, mal leicht das Modul in den Sockel drücken.
-
Das hat dir auch keiner gesagt, sorry. Das Script gibt das jetzt als Hinweis aus.