16 сентября 2025, 15:00

Новости:

Всем привет!!!


Последние сообщения

Страницы 1 ... 7 8 9 10
81
Свобода слова / B4X - Language switcher with E...
Последний ответ от Catcatcat - 29 ноября 2019, 08:25

https://www.b4x.com/android/forum/threads/language-switcher-with-b4r-b4j-mqtt.111769/


B4J code:

Code:
Sub Process_Globals
   Private broker As MqttBroker
   Private client As MqttClient
End Sub

Sub AppStart (Args() As String)
   broker.Initialize("", 51043)
   broker.Start
   client.Initialize("client", "tcp://localhost:51043", "pc")
   client.Connect
   StartMessageLoop
End Sub

Sub client_Connected (Success As Boolean)
   Log("connected: " & Success)
   If Success Then
       client.Subscribe("change language", 0)
   End If
End Sub

Sub client_Disconnected
   Log("disconnected")
   ExitApplication
End Sub

Sub Client_MessageArrived (Topic As String, Payload() As Byte)
   Log(Topic)
   If Topic = "change language" Then
       Dim langs As String
       If Payload(0) = 1 Then
           langs = "en-US, he"
       Else
           langs = "he, en-US"
       End If
       Dim shl As Shell
       shl.InitializeDoNotHandleQuotes("shl", "powershell", Array($"Set-WinUserLanguageList -LanguageList ${langs} -Force"$))
       shl.RunSynchronous(-1)
   End If
End Sub

B4R code:

Code:
Sub Process_Globals
   Public Serial1 As Serial
   Dim p1 As Pin
   Private wifi As ESP8266WiFi
   Private mqtt As MqttClient
   Private client As WiFiSocket
   Private Connected As Boolean
   Private JoystickState As Int
   Private JoystickTimer As Timer
End Sub

Private Sub AppStart
   Serial1.Initialize(115200)
   Log("AppStart")
   p1.Initialize(p1.A0, p1.MODE_INPUT)
   If wifi.Connect2("yyyyy", "xxxxx") Then
       Log("Connected to router.")
   Else
       Log("Failed to connect to router.")
       Return
   End If
   mqtt.Initialize(client.Stream, Array As Byte(192, 168, 0, 104), 51043, "esp8266", _
       "mqtt_MessageArrived", "mqtt_Disconnected")
   Connect(0)
   JoystickTimer.Initialize("JoystickTimer_Tick", 30)
   JoystickTimer.Enabled = True
End Sub

Sub Connect(unused As Byte)
   Log("trying to connect. Wifi? ", wifi.IsConnected)
   If mqtt.Connect = False Then
       Log("trying to connect again")
       CallSubPlus("Connect", 1000, 0)
       Return
   End If
   Log("Connected to broker")
   Connected = True
     mqtt.Subscribe("esp", 0)
End Sub

Sub Mqtt_MessageArrived (Topic As String, Payload() As Byte)
   Log("Message arrived. Topic=", Topic, " payload: ", Payload)
End Sub

Sub Mqtt_Disconnected
   Log("Disconnected")
   mqtt.Close
   Connect(0)
End Sub

Sub JoystickTimer_Tick
   If Connected = False Then Return
   Dim value As Int = p1.AnalogRead
   Dim NewState As Int = 0
   If value > 700 Then NewState = 1
   If value < 300 Then NewState = 2
   If NewState <> JoystickState Then
       Log("New state: ", NewState)
       JoystickState = NewState
       If JoystickState <> 0 Then
           mqtt.Publish("change language", Array As Byte(JoystickState))
       End If
   End If
End Sub

Hardware: ESP8266 + analog joystick
82
Проектирование печатных плат / Free assembly for 5 PCBs with ...
Последний ответ от Catcatcat - 22 ноября 2019, 09:41







Считаю надо попробовать это предприятие, изготовить опытную партию плат.
83
Производители LED / http://www.newstar-ledstrip.co...
Последний ответ от Catcatcat - 21 ноября 2019, 21:29


http://www.newstar-ledstrip.com/


SK9826 16bit 5050 RGB Pixel LED Chip
SK9826 16bit 5050 RGB is the upgrade of SK9822 LEDs, it is High grayscale 65536 level than HD9822, economic type of NS107S 16bit.
SK9826 16bit with 4Khz PWM.
NS107S 16bit with 28Khz PWM.
84
Производители LED / Re: www.rose-lighting.com
Последний ответ от Catcatcat - 21 ноября 2019, 21:17
Fastest 16bits RGB Pixel led HD108, Updated Version of HD107s/Apa102/Apa102c

85
jlcpcb добавили функцию DFM Analysis

теперь можно проверить размещение компонентов, то, что вы загрузили, и после коррекции, хотя я приучился корректировать поворот компонентов в процессе заказ, там это также можно проверять.
86
87
Проектирование печатных плат / (EMEA) Designing the Signal Re...
Последний ответ от Catcatcat - 18 ноября 2019, 16:09
(EMEA) Designing the Signal Return Path Through the PC Board - Susy Webb - Expert Live Training


When designing a PC Board, the signal routing and its return are critical to the circuit working properly. Often, great care is given to routing the signals, but the return portion is the last thing considered, or sometimes it is forgotten altogether. This presentation will talk about the importance of designing that return path with a discussion of the physics involved, where the energy flows, and the planes and stackup needed. We will also look at the spacing that helps prevent problems, the best paths to contain energy, and the routing and return movement from layer to layer. Throughout, we will discuss some signal routes and look at the paths that might set up the best possibility for a clean return.
88
Заказал еще три платы вместо со сборкой, понравилось мне это дело ;D
89
Привет Abby. Интересно бы было просчитать стоимость изготовления и сборки PCB на вашем производстве. Как это можно сделать?
90
Проектирование печатных плат / Re: Заказ прототипов печатных ...
Последний ответ от Abby - 13 ноября 2019, 11:08
Цитата: Catcatcat от 11 сентября 2019, 21:01
раньше делали 10 плат, теперь делают только 5 плат.
Они делают сбоку сейчас хочу эту радость протестировать.

https://jlcpcb.com/

Уважаемый администратор, я очень рад встретиться с вами, JLCPCB действительно хорош, есть также WellPCB из Китая, специализирующаяся на производстве печатных плат и печатных плат, экономически выгодная, вы можете понять, что она не должна вас подвести!
Страницы 1 ... 7 8 9 10