



Quale mi consigliate di comprare?
Quale mi consigliate? Quello blu o quello verde?




Quale mi consigliate? Quello blu o quello verde?
Ciao ragazzi, mi potreste dire cosa ne pensate di questa strategia?:
L'idea è semplice: invece di limitarti a comprare azioni e aspettare che salgano, cerchi di creare un flusso di cassa costante combinando dividendi, premi delle opzioni ed eventuali plusvalenze.
Si acquistano società che si è disposti a tenere per molti anni (es. Coca-Cola, Altria, Johnson & Johnson, Nike, ecc.), preferibilmente quando sono a valutazioni interessanti.
Esempio:
- 1.000 azioni MO acquistate a 35 $.
Finché possiedi le azioni continui a ricevere i dividendi.
Ad esempio, se MO distribuisce circa 1,03 $ per azione a trimestre:
- 1.000 azioni = circa 1.030 $ ogni trimestre.
Mentre possiedi le azioni, puoi vendere una covered call.
Scegli uno strike al quale saresti felice di vendere il titolo (ad esempio 80 $).
Per concedere a un altro investitore il diritto di acquistare le tue azioni a quel prezzo entro una certa data, ricevi subito un premio.
Se il titolo non raggiunge lo strike:
- tieni le azioni;
- tieni il premio;
- continui a incassare i dividendi.
Se il titolo supera lo strike:
- l'acquirente può esercitare la call;
- vendi le azioni allo strike scelto;
- realizzi la plusvalenza;
- tieni comunque il premio già incassato.
Se invece desideri acquistare altre azioni, invece di inserire un ordine di acquisto puoi vendere una cash-secured put allo strike che ritieni conveniente.
Se il titolo non scende:
- tieni il premio;
- non acquisti le azioni.
Se il titolo scende fino allo strike:
- vieni assegnato;
- compri le azioni al prezzo che avevi già deciso;
- tieni comunque il premio.
Questa strategia punta a generare tre tipi di guadagno:
- Dividendi delle azioni possedute.
- Premi ricevuti dalla vendita delle opzioni.
- Plusvalenze quando le azioni vengono vendute a un prezzo superiore a quello di acquisto.
Il compromesso
I premi delle covered call non sono gratis.
In cambio del premio accetti che, se il titolo supera lo strike, potresti dover vendere le tue azioni e rinunciare a una parte del rialzo successivo.
Ha senso una strategia del genere? L'avete mai utilizzata?
Buonasera,
Qualcuno mi potrebbe aiutare a capire come posso scegliere quale fondo conviene che io scelga?
In particolare sto guardando questi:
Vanguard lifestrategy 60/40
Vanguard lifestrategy 80/20
Vanguard 100%
Ho quasi 23 e sono riuscito a risparmiare un po', in cosa mi conviene investire?.
Oppure è meglio lasciare tutto questo e fare stock picking per conto proprio allocando un po' di soldi in diversi titoli azionari?
Grazie.
Buongiorno a tutti,
Volevo chiedere un'informazione, se acquistassi una prima casa e la mettessi in affitto in zona Vimodrone ( quadrilocale, circa 115mq) costo 230k e l'affittasi facciamo a 1500€ al mese, quanto mi rimarrebbe mensilmente? Conviene come investimento?
Qualcuno che già affitta case mi potrebbe condividere la sua esperienza?
Grazie
Hi everyone,
I'm currently designing a custom flight controller from scratch and before moving on to component selection and schematic design, I'd like some feedback on the overall architecture and whether the idea makes sense from a hardware perspective.
My goal is not to build the smallest or cheapest FC possible, but rather a more experimental platform that combines a traditional flight controller with an onboard FPV display system ( what i basically want to make is that the vieo capture from the camera is reproduced on the display on the board )
The main MCU is currently planned to be an STM32F427VGT6.
The flight controller side includes:
Buonasera,
Voglio chiedere un consiglio su come comportarsi a lavoro, vi spiego il contesto:
Lavoro in ufficio tecnico in una grande azienda, molto spesso mi capita di portarmi ad un certo punto con l'attività assegnata dove mi tocca aspettare la risposta da parte dei PM, che molto spesso arrivano dopo tanto tempo e quindi rimango ad aspettare senza fare quasi nulla.
Voi come vi comportereste in questa dinamica, in questo contesti è meglio stare sempre a sollecitare e a cercare di portare le cose il più velocemente possibile? O è meglio adeguarsi ai tempi e fare le cose solo assegnate con i loro tempi "naturali"?
Grazie dei consigli
Ciao a tutti vi racconto una dinamica a lavoro di cui avrei bisogno dei consigli.
Mi capita spesso di andare in altre sede aziendali per lavoro e quando lo faccio mi dirigo direttamente lì senza timbrare nella sede a cui appartengo.
Tempo fa un ragazzo che ora se ne andato ha introdotto una cosa che prevede che tu potevi entrare 30 Min dopo e uscire 30 Min prima.
Io ora ho un ragazzo in reparto che lo fa mentre io all'inizio l'ho fatto ma mi hanno detto di smettere di farlo essendo che lui viene da molto lontano.
Giorni fa parlo con uno e scopro che un altro reparto lo fanno tutti all'interno e quindi vorrei riparlarne con il mio responsabile e convincerlo se si potesse riavere sta cosa essendo che non causa problemi a nessuno e sarebbe un vantaggio per tutti ( tra l'altro questo ragazzo parla molto col mio responsabile e si è proposto di porglielo in modo ambiguo )
Io ci vorrei riparlarne ma ho paura di fare brutta figura, ma io lo trovo giusto.
Voi cosa ne pensate, cosa dovrei fare?
Ps: ho passato il periodo di prova
Grazie mille
Hello all.
I have made a firmware code, i need to test it before actually buying the hardware, is this thing possible?
whats the best emulator to use / what u suggest? Qemu or renode?
For example in my project i use SPI communication, ADC conversions, some gpio to control some mosfets ( to say some )
Thanks in advance
Hello all,
I was wondering if there Is a way to develop and debug the firmware without actually having the HW, like for the Stm32 u know website that allows you to do so? In order to learn programming without having all the boards?
I heard about Proteus for example, what do u suggest me?
Hello all, i have a part of code for the touch screen for the 2478 display.
I have found an example made with Arduino and i have adapted It for stm32, i would like to know if my code Is fine or It has some issues to fix and what u would suggest me to do.
https://www.instructables.com/4-Wire-Touch-Screen-Interfacing-with-Arduino/
This part Is only for the touch controller of the display but i got several questions, like how many readings i should make from the ADC? rn i do and average basically.
Im kinda a newbie i just wanted to know if im in the right path or not
#include "main.h"
#include <stdint.h>
/* ================= CONFIGURAZIONE ================= */
#define LCD_W 320
#define LCD_H 240
// PIN TOUCH (MODIFICA!)
#define X1_PORT GPIOA
#define X1_PIN GPIO_PIN_0
#define X2_PORT GPIOA
#define X2_PIN GPIO_PIN_1
#define Y1_PORT GPIOA
#define Y1_PIN GPIO_PIN_2
#define Y2_PORT GPIOA
#define Y2_PIN GPIO_PIN_3
// CANALI ADC (MODIFICA!)
#define ADC_CH_Y1 ADC_CHANNEL_2
#define ADC_CH_X1 ADC_CHANNEL_0
#define ADC_SAMPLES 8
#define SETTLE_LOOP 3000
/* ================= CALIBRAZIONE ================= */
uint16_t X_MIN = 200, X_MAX = 3800;
uint16_t Y_MIN = 250, Y_MAX = 3750;
/* ================= STRUTTURA ================= */
typedef struct {
uint16_t x_raw;
uint16_t y_raw;
uint16_t x;
uint16_t y;
uint8_t pressed;
} touch_point_t;
touch_point_t tp;
/* ================= GPIO ================= */
static void gpio_out(GPIO_TypeDef* port, uint16_t pin)
{
GPIO_InitTypeDef g = {0};
g.Pin = pin;
g.Mode = GPIO_MODE_OUTPUT_PP;
g.Pull = GPIO_NOPULL;
g.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(port, &g);
}
static void gpio_in_hiz(GPIO_TypeDef* port, uint16_t pin)
{
GPIO_InitTypeDef g = {0};
g.Pin = pin;
g.Mode = GPIO_MODE_INPUT;
g.Pull = GPIO_NOPULL; // Hi-Z
HAL_GPIO_Init(port, &g);
}
static void gpio_analog(GPIO_TypeDef* port, uint16_t pin)
{
GPIO_InitTypeDef g = {0};
g.Pin = pin;
g.Mode = GPIO_MODE_ANALOG;
g.Pull = GPIO_NOPULL;
HAL_GPIO_Init(port, &g);
}
/* ================= ADC ================= */
static void adc_sel(ADC_HandleTypeDef* hadc, uint32_t channel)
{
ADC_ChannelConfTypeDef s = {0};
s.Channel = channel;
s.Rank = ADC_REGULAR_RANK_1;
s.SamplingTime = ADC_SAMPLETIME_71CYCLES_5;
HAL_ADC_ConfigChannel(hadc, &s);
}
static uint16_t adc_once(ADC_HandleTypeDef* hadc)
{
HAL_ADC_Start(hadc);
HAL_ADC_PollForConversion(hadc, HAL_MAX_DELAY);
return (uint16_t)HAL_ADC_GetValue(hadc);
}
static uint16_t adc_avg(ADC_HandleTypeDef* hadc, uint8_t n)
{
uint32_t sum = 0;
for (uint8_t i = 0; i < n; i++) {
sum += adc_once(hadc);
}
return (uint16_t)(sum / n);
}
/* ================= UTILS ================= */
static uint16_t clamp_u16(int32_t v, uint16_t lo, uint16_t hi)
{
if (v < lo) return lo;
if (v > hi) return hi;
return (uint16_t)v;
}
static uint16_t map_u16(uint16_t v, uint16_t in_min, uint16_t in_max, uint16_t out_max)
{
if (in_max <= in_min) return 0;
int32_t r = (int32_t)(v - in_min) * out_max / (in_max - in_min);
if (r < 0) r = 0;
if (r > out_max) r = out_max;
return (uint16_t)r;
}
/* ================= LETTURA X ================= */
static uint16_t read_x_raw(ADC_HandleTypeDef* hadc)
{
gpio_analog(Y1_PORT, Y1_PIN);
adc_sel(hadc, ADC_CH_Y1);
gpio_in_hiz(Y2_PORT, Y2_PIN);
gpio_out(X1_PORT, X1_PIN);
HAL_GPIO_WritePin(X1_PORT, X1_PIN, GPIO_PIN_SET);
gpio_out(X2_PORT, X2_PIN);
HAL_GPIO_WritePin(X2_PORT, X2_PIN, GPIO_PIN_RESET);
for (volatile int i = 0; i < SETTLE_LOOP; i++);
return adc_avg(hadc, ADC_SAMPLES);
}
/* ================= LETTURA Y ================= */
static uint16_t read_y_raw(ADC_HandleTypeDef* hadc)
{
gpio_analog(X1_PORT, X1_PIN);
adc_sel(hadc, ADC_CH_X1);
gpio_in_hiz(X2_PORT, X2_PIN);
gpio_out(Y1_PORT, Y1_PIN);
HAL_GPIO_WritePin(Y1_PORT, Y1_PIN, GPIO_PIN_SET);
gpio_out(Y2_PORT, Y2_PIN);
HAL_GPIO_WritePin(Y2_PORT, Y2_PIN, GPIO_PIN_RESET);
for (volatile int i = 0; i < SETTLE_LOOP; i++);
return adc_avg(hadc, ADC_SAMPLES);
}
/* ================= FUNZIONE PRINCIPALE ================= */
void touch_read(ADC_HandleTypeDef* hadc)
{
uint16_t xr = read_x_raw(hadc);
uint16_t yr = read_y_raw(hadc);
tp.x_raw = xr;
tp.y_raw = yr;
// Detect touch
if (xr < (X_MIN - 50) || xr > (X_MAX + 50) ||
yr < (Y_MIN - 50) || yr > (Y_MAX + 50))
{
tp.pressed = 0;
tp.x = 0;
tp.y = 0;
return;
}
tp.pressed = 1;
xr = clamp_u16(xr, X_MIN, X_MAX);
yr = clamp_u16(yr, Y_MIN, Y_MAX);
tp.x = map_u16(xr, X_MIN, X_MAX, LCD_W - 1);
tp.y = map_u16(yr, Y_MIN, Y_MAX, LCD_H - 1);
}
Hello all,
I'm working on an embedded project based on an STM32F030K6T6 microcontroller.
The MCU is connected to an Adafruit TFT display with an integrated resistive touchscreen. The display is driven via SPI using the ILI9341 controller, while the touchscreen is interfaced using four wires (X+, X−, Y+, Y−).
The resistive touchscreen is read by dynamically configuring the GPIO pins and performing ADC measurements to retrieve raw X and Y coordinates. These raw values are then calibrated and mapped into screen coordinates to detect user interaction with the UI.
The graphical interface consists of four blocks:
- RELAY_1_ON
- RELAY_2_ON
- RELAY_3_ON
- RELAY_4_ON
Each block behaves like a button. When the user touches a block:
- the corresponding GPIO is set HIGH to drive a MOSFET connected to a relay.
When the same block is touched again:
- the GPIO is set LOW, turning the relay OFF.
To handle touch interaction correctly, a simple state machine is implemented to detect press and release events, ensuring that each touch triggers only one toggle action.
Additionally, instead of continuously polling the touchscreen, an external interrupt (EXTI) is used to detect touch events. This allows the MCU to respond efficiently to user input without wasting CPU cycles.
The project is structured into multiple logical blocks for modularity and readability.
I would like to know if this architecture is correct or if there are improvements or issues I should address ( For now i did this part, consider that im a newbie so its not going to be that good )
#include "main.h"
#include <stdint.h>
volatile uint8_t touch_pending = 0; // the program is waiting for the finger to touch the display, i declared it as volatile because obviously its something that can change //
volatile uint8_t touch_active = 0; // if the finger is still on the display //
uint8_t relay_state[4] = {0,0,0,0}; // here i defined the state of 4 relays, since they are multiple i used an array, their state its initially OFF, so i set all to 0 //
typedef struct {
uint16_t x_raw;
uint16_t y_raw;
uint16_t x;
uint16_t y;
} touch_point_t;
touch_point_t tp;
// this structure is used to store touch information //
// x_raw and y_raw contain the ADC values read directly from the touchscreen //
// x and y contain the mapped coordinates relative to the display resolution //
// this allows me to separate raw data from processed data //
uint16_t X_MIN = 200, X_MAX = 3800;
uint16_t Y_MIN = 250, Y_MAX = 3750;
// For the display calibration i had in mind about doing something like this: touching the display at the corners and printing the values which i will set as max and min //
// ========================
// UI STATE MACHINE
// ========================
typedef enum { UI_IDLE, UI_PRESSED } ui_state_t;
ui_state_t ui_state = UI_IDLE;
int pressed_btn = -1;
// here i defined 2 states for my UI: //
// UI_IDLE means no touch is happening (waiting state) //
// here i initialize the UI state as IDLE //
// so the system starts waiting for a touch //
// UI_PRESSED means the user is pressing the screen //
// this variable stores which button has been pressed //
// -1 means no button is pressed //
// 0 = relay 1 and so on //
```
// ======================== //
// PIN DEFINITIONS //
// ======================== //
// TFT //
#define TFT_CS_PORT GPIOA
#define TFT_CS_PIN GPIO_PIN_4
#define TFT_DC_PORT GPIOA
#define TFT_DC_PIN GPIO_PIN_2
// TOUCH //
#define TP_YP_PORT GPIOA
#define TP_YP_PIN GPIO_PIN_0
#define TP_YM_PORT GPIOA
#define TP_YM_PIN GPIO_PIN_1
#define TP_XP_PORT GPIOB
#define TP_XP_PIN GPIO_PIN_0
#define TP_XM_PORT GPIOB
#define TP_XM_PIN GPIO_PIN_1
// RELAY //
#define R_PORT GPIOB
#define R1_PIN GPIO_PIN_4
#define R2_PIN GPIO_PIN_5
#define R3_PIN GPIO_PIN_6
#define R4_PIN GPIO_PIN_7
```