Developer Blog

Tipps und Tricks für Entwickler und IT-Interessierte

Python | Toolbox

Introduction

Update Python Environment

Update all Python packages

pip3 list| cut -f1 -d' '|xargs -I {} pip3 install {} --upgrade

Debugging and Tracing

def tracefunc(frame, event, arg, indent=[0]):
      if event == "call":
          indent[0] += 2
          print "-" * indent[0] + "> call function", frame.f_code.co_name
      elif event == "return":
          print "<" + "-" * indent[0], "exit function", frame.f_code.co_name
          indent[0] -= 2
      return tracefunc

import sys
sys.settrace(tracefunc)

main()

Arduino | Getting started

Introduction

I just want to learn and work with a new technology, so I bought a 3D printer based on an Arduino Mega 2560. (More on this in the following Blog entry)

To be prepared with the Arduino, I want to play with it. So I started with a starter kit and a sensor kit from elegoo.com

Set / Kit for Arduino MEGA2560
Most complete Ultimate Starter Kit with German tutorial, MEGA2560 R3 Microcontroller and many additional for the Arduino Mega2560 R3

Upgraded 37 in 1 Sensor Modules Kit
With English tutorial for the Arduino UNO R3 MEGA 2560 Nano

First Steps

Setup and illuminate the lab

Start with a simple project

After installing and setting up everything, I started with my first small project: Measure the distance with a sonic sensor and display it through an LCD panel:

Arduino IDEs

Platform IO

Scratch for Arduino

ArduBlock

Appendix

Set / Kit für Arduino – Elegoo MEGA2560

1 x MEGA2560 R3 Mikrocontroller
1 x MB-102 Versuchsaufbau
1 x Prototyp-Erweiterungsplatine
1 x LCD1602 Anzeige(mit Pin Header)
1 x DHT11 Modul
1 x Joystick-Modul
1 x 5V Relais
1 x Schallsensor-Modul
1 x DS3231 Echtzeituhren-Modul
1 x Drehgeber modul
1 x Membranschalter-Modul
1 x Versuchsaufbau
1 x HC-SR501 PIR-Modul
1 x ADXL335 Modul
1 x MAX7219 Modul
1 x Wasserfüllstanderkennung-Sensormodul
1 x RC522 RFID-Modul
1 x Servomechanismus (SG90)
1 x Schrittmotor
1 x ULN2003 Schrittmotor-Treibermodul
1 x Power Supply Module
1 x Ultraschall-Sensor-Modul
1 x IR-Empfängermodul
1 x IR-Fernbedienung
1 x 3V Gleichstrommotor
1 x USB Kabel
1 x 65 M-M Kabel
1 x 10 Female-to-Male Kabel
1 x 9 V Akku mit DC
1 x 9 V 1 A Netzteil
1 x Kugelschalter
1 x Segmentanzeige
1 x 4-stellige 7-Segmentanzeige
1 x IC L293D
1 x IC 74HC595
1 x Aktiver Summer
1 x Passiver Summer
2 x Potentiometer
1 x Thermistoren
5 x Diode Rectifier (1N4007)
5 x NPN Transistor (pn2222)
5 x NPN Transistor (S8050)
2 x Fotozelle
5 x 22pF Keramikkondensator
5 x 104pF Keramikkondensator
2 x Elektrolytkondensator (10uF 50 V)
2 x elektrolytischen Kondensator (100uF 50 V)
1 x RGB LED
5 LEDs, jeweils in weiß, gelb, blau, grün, rot
5 x Druckschalter
10 Widerstände (Ohm): 10, 100, 220, 330, 1k,  2k, 5k1, 10k, 100k, 1m

Upgraded 37 in 1 Sensor Modules Kit

1 x JoystickModule
1 x RelayModule
1 x Rotary EncoderModule
1 x DS-3231 RTC Module
1 x Ultrasonic SensorModule
1 x HC-SR501 PIR sensor Module
1 x Flame SensorModule
1 x Linear HallModule
1 x Metal TouchModule
1 x Digital TemperatureModule
1 x Big SoundModule
1 x Small SoundModule
1 x RGB LEDModule
1 x SMD RGBModule
1 x Two-tone ColorModule
1 x 7 Color FlashModule
1 x Laser EmitModule
1 x ShockModule
1 x IR ReceiverModule
1 x IR EmissionModule
1 x Tilt SwitchModule
1 x ButtonModule
1 x Active BuzzerModule
1 x Passive BuzzerModule
1 x 18B20 tempModule
1 x Photo-resistorModule
1 x Temperature and HumidityModule
1 x GY-521 Module
1 x Photo-interrupterModule
1 x Tap ModuleModule
1 x Membrane SwitchModule
1 x AvoidanceModule
1 x TrackingModule
1 x Magnetic SpringModule
1 x Water Lever Sensor
1 x Power Supply Module
1 x LCD1602 Module (with pin header)