Jump to content

dil_bert

Members
  • Content Count

    600
  • Joined

  • Last visited

  • Days Won

    3

dil_bert last won the day on June 12

dil_bert had the most liked content!

Community Reputation

5 Neutral

About dil_bert

  • Rank
    Prolific Member

Profile Information

  • Interests
    used OpenSuse for more than 10 years - now stick to Manjaro; Interested in all raspi-things, Python, Perl, PHP and GIS,

Recent Profile Visitors

4,928 profile views
  1. hello dear Barand many thanks - as allways your answers are excellent - and just overwhelming! I am happy and glad to see such a convincing answer. i also had a look at the ASCII generators for ERD diagrams (perhaps that fit well within markup syntax)? For example, that could generate something like the diagram below: to create such diagrams i guess such a tool might be helpfull: http://asciiflow.com/ [CODE] --------- | Hai | --------- | | /|\ --------- ------------ --------- | Foo |-------< | FooBar | >------- | Bar | --------- ------------ --------- \|/ | | --------- | Bai | --------- [/CODE]
  2. hello dear all , topic: questions with some eplanations - for db-related areas and topics - export er-diagram i want to post questions with some eplanations - for db-related areas and topics. Well i know that there are some good tools out there which help here alot. The question is : how to export the data so that i can implement the data into a forum like this !?! Question can i export the data form https://www.draw.io/ to this forum!? Love to hear from you regards
  3. hello dear Barand, sorry for posting this german text. I will look for a good translation, Above all - i am very happy to be in this great forum - it is a overwhelming place to be. have a great day.
  4. hello dear all , want to create a bird-house - with live-cam. for this Applikation _ that includes a Camera and a ESP 32. i would like to choose this ESP32 - Set. KeeYees WiFi + Bluetooth Modul Kit, 4M PSRAM ESP32-CAM Dual-Core 32 Bit CPU developerboard+ OV2640 2MP cameramodul + 8 dBi WiFi Antenna + IPEX RP-SMA Buchse Pigtail WiFi Antenne Kabel https://www.amazon.de/KeeYees-Bluetooth-ESP32-CAM-Entwicklungsboard-Kameramodul/dp/B07QS7VFMJ do you think that i can do this with this set!?
  5. hello dear Barand, as usual - your answers are very very helpful and supportive. Many thanks for all!! convinced: If the sites are all on the same server then we just cam connect to the same database from each site, that's all there is to it. If the sites are on different servers then we would need to build an API, but - if they're (luckily) on the same server then just connect to whatever database we want to connect to. There are no rules. We can connect to a database - and yes - we also can use a db object to connect to more than only one db. PHP doesn't care how many database connections we have. Many thanks Barand for your help. i am convinced. have a great day.
  6. hello dear php-experts, good day, i want to connect two pages on which a plugin like participants_database or wp-job-manager runs i want to do that via wpdb to another database :: how to combine two wp-pages - here i want to discuss a approach that works - see https://wordpress.stackexchange.com/questions/1604/using-wpdb-to-connect-to-a-separate-database If they are all on the same server under the same hosting account, that is helpful. In a case like that, you could write your custom code to access the other site’s database directly. This is discussed here, and it’s quite feasible: link: Using wpdb to connect to a separate database [/QUOTE].... question: I want to connect wpdb to another database. How do I create the instance and pass it the database name/username/password? Answer1: 134 votes Yes it's possible. The wpdb object can be used to access any database and query any table. Absolutely no need to be Wordpress related, which is very interesting. The benefit is the ability to use all the wpdb classes and functions like get_results, etc so that there's no need to re-invent the wheel. Here's how: $mydb = new wpdb('username','password','database','localhost'); $rows = $mydb->get_results("select Name from my_table"); echo "<ul>"; foreach ($rows as $obj) : echo "<li>".$obj->Name."</li>"; endforeach; echo "</ul>";[/CODE] comment 1: you can also save time by using global $wpdb. But before firing ;[/CODE]$wpdb->get_results method,;[/CODE] you must include wp-load.php as: [CODE]require_once('/your/wordpress/wp-load.php');[/CODE] comment 2: Set WPDB prefix to make WP_Query and get_post to generate correct sql query by calling $mydb->set_prefix('wp_'); answer2: [ 30 votes ] Connecting to a second database is easy in WordPress, you simply create a new instance of the WPDB class and use it the same way you would use the standard $wpdb instance we all know and love. Assuming the second database has the same login information as the main WP one you can even use the predefined constants from wp-config.php to avoid hardcoding the login information. [CODE]/** * Instantiate the wpdb class to connect to your second database, $database_name */ $second_db = new wpdb(DB_USER, DB_PASSWORD, $database_name, DB_HOST); /** * Use the new database object just like you would use $wpdb */ $results = $second_db->get_results($your_query);[/CODE] comment 1: This is somewhat redundant to Wadih's answer but I think my code example is a bit clearer and its also important to remember the db login constant's as they are almost always the right ones to use and otherwise you risk issues when moving from dev->stage->live environments where the login details might change. – jerclarke Sep 11 '10 at 20:55 comment 2: Set WPDB prefix to make WP_Query and get_post to generate correct sql query by calling [CODE]$second_db->set_prefix('wp_'); [/CODE] answer3: [ 21 votes ] no one has said this so I thought I'd add an even easier way..as long as your additional database has the same user/pass details to access it as your wordpress database you can use the database name before the table name like this [CODE]$query = $wpdb->prepare('SELECT * FROM dbname.dbtable WHERE 1'); $result = $wpdb->get_results($query);[/CODE] comment 1: From my experience, this only works to get data, i.e. using SELECT. You can't insert data. comment 2: it will not work externally, answer4: [ 7 votes ] I can't comment yet, but I wanted to expand on Wadih M.'s answer (which is great). WP's database class is a customized version of Justin Vincent's ezSQL. If you like the interface and you're wanting to do a site that's not WordPress-based, you might want to check it out: http://justinvincent.com/ezsql answer5: [ 6 votes ] While these will work, you'll lose the ability to use the "other" custom features such as get_post_custom and wordpress queries. The simple solution is [CODE] $wpdb->select('database_name');;[/CODE] which changes the database system-wide (a mysql select_db). The database.table method works if you just want to make a simple query, but if you want to access another wordpress blog you can use select. You'll just need to change it back when you're done or your blog may do strange things. comment: I'm using this solution and it works great, except for one thing. For some unknown reason wp_get_post_terms() doesn't seem to use the newly selected DB?? Every other function I've tried (like [CODE]get_post_meta(), get_posts() etc);[/CODE] seems to work just fine but ;[/CODE]wp_get_post_terms() ;[/CODE]seems to work towards the ;[CODE]DB_NAME database;[/CODE]. Any ideas? I was struggling with ;[CODE]using $wpdb ;[/CODE]to connect to a second blog database from a parent site that needs to update two blogs. I used ;[CODE]$wpdb->select($dbname, $dbh);[/CODE] to select the second database, but I was still getting results from the first database. comment: I resolved the problem by calling wp_cache_flush() to clear the WordPress cache before calling WP functions on the second database. Conclusio: well i like this approach very very much. The good thing - i am with the sites in question - i am on the same server - so i guess that this will work for me. any idea any experience !? love to hear from you
  7. dear Kicken, many thanks for the quick reply. Great to hear from you. I am very glad to have your advice. I will do so and buy all the recommendet regulators By the way: i am very glad to be here - this is an great place to discuss all things i am interested in. I really love this board. have a great day!! greetings Dil_bert
  8. hello dear all besides some projects with RC-Cars where i have a full set of hardware i have some iot-projects in mind where i only need the esp 8266 (/ and in several the esp32 ) and a set of little sensors. some questions. Is it suffice if i only take two of the following akku-blocks to power all that. NiMH-Akkupack H-AA1200Bx2, 2x AA 2,4 V/1200 mAh, bestehend aus 2 NiMH-Mignonzellen. Einsetzbar für Modellbau, Beleuchtungszwecke, Telefone, Funkgeräte usw. Maße (BxHxT): 28x50x14 mm. Bitte Beachten: Das Fertigungsdatum dieser Akkus ist KW17/2007. Eine Stichprobe von 10 Stück ergab 4 gute Akkupacks (Kapazität nach Auffrischung > 70% der Nennkapazität). see https://www.pollin.de/p/nimh-akkupack-h-aa1200bx2-2x-aa-271629 love to hear from you greetings
  9. hello dear community, Servo Control with Micropython - with the ESP 8266 ...- compared to Arduino I work with young kids and I'm always looking for economical platforms to build intriguing projects. While we can say that Arduino clones are pretty cheap, it uses the C/C++ language that the kids are not familiar with. This is pretty challenging. Also and furthermore, it doesn't have a built-in WiFi which is a must for all the IoT projects that i have in mind. On the other hand, while Raspberry Pi has WIFI and kids can program it using Python, it is still an expensive platform to just control few GPIO ports to turn devices on and off. I need something in between that has both WIFI and Python capabilities. It appears that I found my answer in MicroPython flashed onto a cheap ESP8266-based board. so going the Micropython way is a good thing i thought; now - for the RC-Car Projects i have in mind i found a interesting library. + see this Micropython Library for Hobby Servo Control for ESP8266 cf: https://bitbucket.org/thesheep/micropython-servo/src/default/ The PWM method of machine takes two inputs, the pin to which we want connect servo (in case of ESP8266 we can choose one from 0, 2, 4, 5, 12, 13, 14 and 15) and frequency of the PWM signal. Most of the hobby servos work with 50Hz PWM, so we choose that. Then we can use duty method to set the angle we can call servo.duty() method to change the set the servo angle so the question is just - do we need that library - cannot we just start without that love to hear from you
  10. hello again well i think that i should use adafruit's "circuit python" because I think they have superior tutorials and controller-oriented libraries... Probably with esp32 huzah feathers, because of the feather wings available, if I could afford them. (But I don't believe that CircuitPython requires an Adafruit board...) Adafruit is like... mind-reading evangelists with teaching skills! Librarian skills, too: https://github.com/adafruit/awesome-circuitpython the other thing is: In choosing between ESP8266 and ESP32 the main factor is code size. If we can anticipate writing programs longer than, say, 200 lines of code (LOC) we may find that we need to cross-compile the code. Larger programs may require us to freeze the bytecode on ESP8266. This involves re-compiling the source and installing the resultant build. We can then run programs in the high hundreds of LOC. It's hard to be precise about these figures as they depend on what the code actually does. ESP32 has much more headroom. If we use boards with SPIRAM then we can run seriously large programs. furthermore: There is also the Pyboard D series but that is outside my price range. hope to hear from you
  11. dear community I work with Kids. I'm always looking for economical platforms to build intriguing projects. there are systematical decisions: in earlier times i use Arduino and Raspberry Pi for the projects because the eco-sytems of Arduino and Raspi support rich options to combine. While Arduino clones are cheap, it uses the C/C++ language. that kids are not familiar with. and - yes it doesn't have a built-in WiFi-support. But that is pretty important for me. WiFi-Support is a must for all the IoT projects i am interested in. On the other hand, while Raspberry Pi has WIFI and kids can program it using Python, it is still an pretty expensive platform to just control few GPIO ports to 1. turn devices on and off. 2. run a little RC-Car 3. have a look in the birds house that is in the garden I need something in between that has both WIFI and Python capabilities. It appears that I found my answer in MicroPython flashed onto a cheap ESP8266-based board - and yes - now we also can use ESP32 too. What is Micropython? According to its website, MicroPython is a lean and efficient implementation of the Python 3 programming languages. And Python is one of the most widespread and well known language - also my kids have access to a lean python introduction. In other words: Python is much easiser to learn than C /C++ - Python does not have all those pitfalls. Micropython that includes a small subset of the Python standard library and the good thing; Micropython is optimized to run on microcontrollers and in constrained environment (such as ESP8266). It's essentially Python IDE on a chip. One major benefit is that you can create code and change it on the fly using a web-browser client called Webrepl. (Try to do that in Arduino.) You can also see sensor data in real-time on Webrepl instead of rely on data logging or an LED screen in Arduino. What is ESP8266? In short, think of it as an Arduino with built-in network capability. You can use the Arduino IDE to program ESP8266 boards in C/C++ or you can flash it with NodeMCU or MicroPython. In this project, I'll be flashing MicroPython onto an ESP8266 board. I decided to get a WEMOS D1 which is based on ESP8266-12EX for this simple project where I'll be navigating a 2WD car using a web browser. There are other boards that are designed for MicroPython but I wanted something cheap that I could throw away if it didn't meet my criteria. As expected, it met all my requirements and most likely I'll be incorporating WeMos and Micropython into future projects. among them are ... a. creating rc-cars b. other IoT projects which ESP would you decide ? - NodeMcu Lua WIFI Internet Development Board based on ESP-12E CP2102 - Adafruit Assembled Feather HUZZAH w ESP8266 WiFi With Stacking Headers - ESP8266 ESP-13 Web Sever WIFI Wireless Shield for Arduino UNO R3 which one would you take? or would you choose the ESP 32 !? love to hear from you
  12. Development boards for my workbench - which one to choose!? ello dear Community currently i am ordering a bunch of tings at me german retailer. among them the following development boards are: - NodeMcu Lua WIFI Internet Development Board based on ESP-12E CP2102 - Adafruit Assembled Feather HUZZAH w ESP8266 WiFi With Stacking Headers - ESP8266 ESP-13 Web Sever WIFI Wireless Shield for Arduino UNO R3 question: do i need more - or should / would you replace one of the above mentioned boards by another!? my main interest is to develop remote controlled cars .... sensu https://www.instructables.com/id/MicroPython-IoT-Rover-Based-on-WeMos-D1-ESP-8266EX/ https://www.instructables.com/id/Arduino-izing-Lego-Technic-Go-Kart/ love to hear from you regards here the list - which one should i take - i guess i take all of them... Feather is the (new) development board from Adafruit, and like it's namesake it is thin, light, and lets you fly! Feather was created to be a new standard for portable microcontroller cores. The Adafruit Feather HUZZAH ESP8266 - a try to take on an 'all-in-one' ESP8226 WiFi development board - with built in USB and battery charging. - Its an ESP8266 WiFi module with all some extras: - Adafruit Assembled Feather HUZZAH w ESP8266 WiFi With Stacking Headers https://eckstein-shop.de/Adafruit-Assembled-Feather-HUZZAH-w-ESP8266-WiFi-With-Stacking-Headers Artikelnummer: AF3213 Kategorie: Boards 21,17 Feather HUZZAH's heart is an ESP8266 WiFi microcontroller clocked at 80 MHz and at 3.3V logic. This microcontroller contains a Tensilica chip core as well as a full WiFi stack. You can program the microcontroller using the Arduino IDE for an easy-to-run Internet of Things core. There also exist a wired up a USB-Serial chip that an upload code at a blistering 921600 baud for fast development time. It also has auto-reset so no noodling with pins and reset button pressings. And a connector for any of our 3.7V Lithium polymer batteries and built in battery charging. it will run just fine straight from the micro USB connector. Here's some handy specs! Measures 2.0" x 0.9" x 0.28" (51mm x 23mm x 8mm) without headers soldered in Light as a (large?) feather - 9.7 grams ESP8266 @ 80MHz with 3.3V logic/power 4MB of FLASH (32 MBit) Built in WiFi 802.11 b/g/n 3.3V regulator with 500mA peak current output CP2104 USB-Serial converter onboard with 921600 max baudrate for uploading Auto-reset support for getting into bootload mode before firmware upload 9 x GPIO pins - can also be used as I2C and SPI 1 x analog inputs 1.0V max Built in 100mA LiPoly charger with charging status indicator LED, can also cut a trace to disable the charger Pin #0 red LED for general purpose blinking. Pin #2 blue LED for bootloading debug & general purpose blinking Power/enable pin 4 mounting holes Reset button Technical Details 23mm x 51mm x 19mm / 0.9" x 2" x 0.74" Weight: 9.4 NodeMcu Lua WIFI Internet Development Board based on ESP-12E CP2102 https://eckstein-shop.de/NodeMcu-Lua-WIFI-Internet-Development-Board-based-on-ESP-12E-CP2102 Artikelnummer: CP06030 7,94 € Übersicht The Development Kit based on ESP8266, integrates GPIO, PWM, IIC, 1-Wire and ADC all in one board. Power your development in the fastest way combination with NodeMCU Firmware. Features SoC for Iot & Smarthome CP2102 USB chip Open-source, Interactive, Programmable, Low cost, Simple, Smart, WI-FI enabled Arduino-like hardware IO Advanced API for hardware IO, which can dramatically reduce the redundant work for configuring and manipulating hardware. Code like Arduino, but interactively in Lua script. Nodejs style network API Event-driven API for network applications which faciliates developers writing code running on a 5mm*5mm sized MCU in Nodejs style. Greatly speed up your IOT application developing process. Lowest cost WI-FI Technical Details of ESP8266 802.11 b/g/n Integrated low power 32-bit MCU Integrated 10-bit ADC Integrated TCP/IP protocol stack Integrated TR switch, balun, LNA, power amplifier and matching network Integrated PLL, regulators, and power management units Supports antenna diversity WiFi 2.4 GHz, support WPA/WPA2 Support STA/AP/STA+AP operation modes Support Smart Link Function for both Android and iOS devices SDIO 2.0, (H) SPI, UART, I2C, I2S, IR Remote Control, PWM, GPIO STBC, 1x1 MIMO, 2x1 MIMO A-MPDU & A-MSDU aggregation & 0.4s guard interval Deep sleep power <10uA, Power down leakage current < 5uA Wake up and transmit packets in < 2ms Standby power consumption of < 1.0mW (DTIM3) +20 dBm output power in 802.11b mode Operating temperature range -40C ~ 125C You can also check our "Dokumente" for more informatio ESP8266 ESP-13 Web Sever WIFI Wireless Shield for Arduino UNO R3 https://eckstein-shop.de/ESP8266-ESP-13-Web-Sever-WIFI-Wireless-Shield-for-Arduino-UNO-R3 13,95 The shield is designed based on ESP8266, and pin-compatible with Arduino UNO/Mega2560 DevBorad. WiFi module is industrial-grade chips ESP8266, which is ESP-13 with metal shield, has strong anti-interference ability; This shield is pin-compatible with Arduino Uno, Mega2560 and other control board. A voltage converter chip is used to deal with 3.3V (Esp8266) and 5V (Arduino); Dual DIP switches is used for serial ports so that this module shield can be used alone as an Arduino Uno expansion board, and also be used as ESP8266 expansion board; Serial data is transported to WiFi device transparently, and vice versa. Arduino program does not need any configuration; Web Server is developed to configure WiFi parameters and serial port parameters; This shield can be used as an independent ESP8266 development board. for instance, downloading the official AT commands firmware, NodeMCU open source firmware can be used; This shield also can be used as stand-alone expansion board for Arduino Uno Technical Details of WIFI Wireless Shield 802.11 b / g / n wireless standards; STA / AP modes support ; TCP / IP protocol stack, One socket; Supports standard TCP / UDP Server and Client; Supports serial port baud rate configuration: 1200/2400/4800/9600/19200/38400/57600/74800/115200 bps; Supports serial data bits: 5/6/7/8 bits; Supports serial parity: none; Supports serial stop bits: 1/2 bit; Pin-compatible with Arduino UNO, Mega; Arduino Pinout 2/3/4/5/6/7/8/9/10/11/12/13; ESP8266 GPIO Pinout 0/2/4/5/9/10/12/13/14/15/16 / ADC / EN / * UART TX / UART RX; KEY button: modes configuration; Dual-Ports DIP switches: switching Arduino and ESP8266; WiFi operation current: continuous transmission operation: ˜70mA (200mA MAX), idle mode: <200uA; Serial WiFi transmission rate: 110-460800bps; Temperature: -40°C ~ + 125°C; Humidity: 10 percent-90 degree non-condensing; You can also check our "Dokumente" for more information Package List 1x ESP8266 ESP-13 Web Sever Serial WiFi Shield Expansion Board for UNO R3 to sume up the above: among them the following development boards are: - NodeMcu Lua WIFI Internet Development Board based on ESP-12E CP2102 - Adafruit Assembled Feather HUZZAH w ESP8266 WiFi With Stacking Headers - ESP8266 ESP-13 Web Sever WIFI Wireless Shield for Arduino UNO R3 question: do i need more - or should / would you replace one of the above mentioned boards by another!? my main interest is to develop remote controlled cars .... sensu https://www.instructables.com/id/MicroPython-IoT-Rover-Based-on-WeMos-D1-ESP-8266EX/ https://www.instructables.com/id/Arduino-izing-Lego-Technic-Go-Kart/ love to hear from you regards
  13. I have figured it out. The CH340G chip is on the Wemis boards which thus have an USB socket & interface. So in other words - the CH340 (or a similar USB to TTL serial adapter chip) is the chip on the WeMos board takes care for the USB-Socket and interface.
  14. hello dear experts, this tutorial here - ( regarding the rc car that runs with micropython ) notes the following Step 4: MicroPython Installation cf: https://www.instructables.com/id/MicroPython-IoT-Rover-Based-on-WeMos-D1-ESP-8266EX/ well - is the chip that is mentioned - Wemos has a serial/USB chip based on CH304G - is it on the WEMOS Board or should i add them on a breakout-board!? well i want to stick with Mycropython in the project - i want to go this way. love to hear from you, regards
  15. hello and good evening dear php-Freaks, hope you are all right and all goes well i am planning to run a mega-menu on a Wordpress-site. I have had a look at various modules - and found out this one here https://de.wordpress.org/plugins/search/mega+menu/ the so called mega - menu https://de.wordpress.org/plugins/megamenu/ Question: does any bod have some experience with that module /plugin!? Love to hear from you
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.