Categories
Mastering Development

How to correct the below error message which comes while connecting my arduino with firebase

I am trying to connect the arduino with firebase using the esp8266 but even though i have already added the esp8266wifi.h libary i still get the following error message. Arduino: 1.8.12 (Windows 10), Board: “NodeMCU 0.9 (ESP-12 Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 […]

Categories
Development

Removing gloabl app reference from blueprint in Flask

I’m currently working on learning Flask and create a working page with login functions. Now I want to remove the global app instance and started using blueprints for the submodules. My project is structured like this: + app + auth – __init__.py – forms.py – routes.py + main + models + templates – __init__.py + […]

Categories
Development

Flask deployment to Heroku: URL Not Found and ModuleNotFoundError, discussing Flask file structure compatible for Heroku

I’m still stuck with the error mentioned in this question Heroku/Flask deployment failing, either 'can't find attribute app' or 'can't find module name (flask_module)', proc file to blame? But I’m starting to think the problem is moreso my Flask application directory structure more than anything else. There’s a lot of inconsistencies between many tutorials for […]

Categories
Development User Help

USB star config

I’m facing the following scenario: Step1: I have a board (device1) that has a USB stick (device2) connected to it. Step2: I have to unplug the USB stick (device2) and connect the board (device1) to a workstation (device3) in order to execute commands, flash, etc. Step1: I need to connect USB_Device1 as master to USB_Device2 […]

Categories
Development User Help

USB star config

I’m facing the following scenario: Step1: I have a board (device1) that has a USB stick (device2) connected to it. Step2: I have to unplug the USB stick (device2) and connect the board (device1) to a workstation (device3) in order to execute commands, flash, etc. Step1: I need to connect USB_Device1 as master to USB_Device2 […]

Categories
Development

Is there a way to prevent sql import changing date to epoch timestamp?

I am trying to import data from an sql table into Google sheets. The first task is to fetch the data from the database, like so: from flask import Flask, flash, request, jsonify import pandas as pd import psycopg2 import json import os app = Flask(__name__) def connect_database(): return psycopg2.connect( host=’redshift-cluster-beta.cavck3fkrmaf.eu-central-1.redshift.amazonaws.com’, port=int(5439), user=os.getenv(‘AWSUSERNAME’), password=os.getenv(‘AWSPASSWORD’), database=’beta’ […]

Categories
Development

read latest line of an output of a infinite running subprocess in python

I am trying to periodically read the most recent output of a subprocess, to then process further elsewhere. I am not that experienced in subprocesses, maybe you have some best practices for me? The steps are: Start the process: This process should run in the background, so I will not see its whole output on […]

Categories
Development

doesn’t compile code with Include AzureIoThub.h on esp8266 device

I’m trying to connect my esp8266 device to azure IOT hub, and from my understanding the way to go is to use the official AzureIoThub library (as distributed on library manager) but somewhy any code with this included library doesn’t compile. I get the following errors upon including the library. Arduino: 1.8.9 (Windows Store 1.8.21.0) […]

Categories
Development

Visual Studio Code, Tasks not asinging input variable, parsing a command

I’m trying to make a task build code for ESPRESSIF IDF natively in VSCode on Linux (Ubuntu 10) but I’m running into some issue with the following task: // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format “version”: “2.0.0”, “tasks”: [ { “label”: “Build Firmware”, “group”: “build”, “type”: “shell”, “command”: “idf.py”, “args”: [“build”], […]

Categories
Development

Trouble locating where photos are being saved flask python

I know these photos are being uploaded and submitted but I am unsure where they are being saved. I want them saved into folder path ‘/home/HassanSherien/mysite/Shape_Image/’ Python Link: https://www.pythonanywhere.com/user/HassanSherien/shares/dbfb8371468a4e43b4df67a44a02e36f/ Python Code: import os from flask import Flask, flash, request, redirect, url_for, render_template, send_from_directory from werkzeug.utils import secure_filename UPLOAD_FOLDER = ‘/home/HassanSherien/mysite/Shape_Image/’ ALLOWED_EXTENSIONS = {‘png’, ‘jpg’, ‘jpeg’} […]