Author Topic: Serial TX only? (no RX)  (Read 685 times)

oulala

  • Newbie
  • *
  • Posts: 1
Serial TX only? (no RX)
« on: April 04, 2017, 02:09:17 am »
Hello !

I have a project to build wireless anemometer / wind direction sensor.

So far, I need the following pins:

- 2pin I2C (SDA/SCL) to discuss with a RTC (1Hz reference) counter and ADC (to read wind direction sensor + battery, solar panel etc...)
- 1pin GPIO to Supply or enable my 360° angle sensor.
- 1 interrupt pin to receive 1Hz signal from RTC (used to have accurate check of "millis()" or "micros()".
- 1 interrupt pin to receive anemometer (1 pulse per turn, 1 turn = 4km/h wind).
- 1 TX serial pin to sent data every 3 seconds (I plan to use one for those BLE serial interface.

This will busy the whole 6 pins of the digispark.
I was wondering how I could use only serial "TX", I dont need RX.

By the way, talking about serial.
I have seen this "softwareserial" lib, but didnt tried it yet.

Currently, for debug purpose, I have juste try "Serial.begin(9600)" and it works!
I have a serial output on pb2 (I connect it to my computer with a FTDI serial interface and putty).

is this way to use serial OK ?
Can I change the port ? (as pb2 seems needed by I2C)












lolo6212

  • Newbie
  • *
  • Posts: 2
Re: Serial TX only? (no RX)
« Reply #1 on: July 05, 2017, 07:55:43 am »
Hello,
I haven't receiving yet my digispark boards, then, maybe i do a mistake, but as far as i know you can use Putty or whatever serial console you want for debugging.
For the other port i think yes.
But i stay surprise by two things.
Why you want stuck a Pin and use 'softwareserial' library on a wireless project ? Unless in debug mode, the softwareserial library need wiring to another device to work, no matter it's in RX or TX only.
Why you want to use the 1Hz clock signal for accurate the millis() or micros() as you have the time on your RTC through the I2C bus ?
Unless the code is too heavy to transform a date/time reference from the RTC in a 'long'. Otherwise you can do the same it's in millisec also. It's also timer in RTC, more stable, but timer.

In any case your code interesting me to study it, if it's not too much demanding that you will share it, thanks

Regards
« Last Edit: July 05, 2017, 08:06:35 am by lolo6212 »