Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - dnl

Pages: 1
1
I'm using a TinyZero with the WiFi (WINC1500) Tiny Shield in a cloudless monitoring project. While porting the code from an Adafruit platform to Tiny Circuits devices, I saw the WiFI driver interacted with the builtin LED (LED_BUILTIN). There's no such interaction with the Adafruit WINC1500 device.

I isolated the problem using the WiFi sample code at https://learn.tinycircuits.com/Communication/WiFi_TinyShield_Tutorial/. I added code to turn the builtin LED on at the start of setup(); the LED is turned off when WiFi.begin() is called (also WiFi.status()). The LED cannot be turned on again after the call. WiFi.setPins() does not affect the LED. Modulo this interaction, the example code works as expected. My much larger monitoring project also works as expected, which includes AP and client modes (the latter uses SSL).

I don't see any mention of this in the compatibility matrix at https://tinycircuits.com/pages/tinyduino-overview.

Please advise.

2
A note for future users of the Bluetooth Low Energy TinyShield (ST). The tutorial demonstrates using nRF UART v2.0. The Android app does not appear to be current and fails. Fortunately, I did suceed with nRF Toolbox and its Universal Asynchronous Receiver/Transmitter (UART) function.  To use, select the funtion, press All when the scanner starts, select BlueNRG, et voilĂ !

Quote
General Discoverable Mode.
Connected to device:79-42-45-07-1A-48
12 : Hello, world


I also tried Serial Bluetooth Terminal, but it returns a message Connection failed: no write characteristic (4/16).

HTH
--
dnl

3
I was working with a TinyZero processor and all was well. Could reliably turn the device on and off and the USB device, 03eb:8008, would always show up and be recognized as /dev/ttyACM0. I could also repeatedly compile and install a program. This worked with or without your 150mAh battery attached.

Here's the relevant USB device data from usb-devices(1):
Code: [Select]
T:  Bus=01 Lev=02 Prnt=02 Port=05 Cnt=04 Dev#= 14 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=03eb ProdID=8008 Rev=01.10
C:  #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm
I:  If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm

At some point, this stopped. The USB device now appears if and only if I use the reset button. It will remain present as long as I don't turn the TinyZero off. It will also remain present until the program installation is complete. Once I turn it off, or install a program, the USB device is no longer present.

The program that I installed does work regardless of the state of the USB device. I've been using your TinyScreenBasicButton program to try to debug this problem.

I've done this on multiple Linux hosts using different OS versions. Both worked hosts earlier, and now both behaves identically. That is, this is NOT a host issue.

This happens with or without your 150mAh battery attached

It appears the initialization sequence without the reset sequence is  corrupted so that the USB device doesn't initialize even though the installed program does work.
Is there some deeper reset I can do?
Is there a way to flash the bootloader again?

Please advise?

4
TinyDuino Processors & TinyShields / TinyZero + GPS + Analog
« on: March 20, 2022, 12:32:09 AM »
I'm building a gadget to produce some values needed for astrophotography. A GPS is the key item, and the ASD2501-R is working fine. Woohoo!

I was trying to add an analog sensor, but I could not get sensible values on A3 or A0. A test code that read the sensor reported correct results for both A/D inputs. Adding that identical code to a program using the GPS produced nonsensical results regardless of the input. Debugging eventually lead me to this call:

Code: [Select]
SoftwareSerial swuart( GPS_RXPin, GPS_TXPin );

It seems that executing the above was the source of my A/D problems. Worse yet, the effect lingers even when the known-good test code was reloaded. Turning the TinyZero off and then restarting restored correct A/D function.

As grep is my friend, it now appears an analog sensor is a non-starter as all the analog inputs are consumed by the GPS (GPS_TXPin = A0, GPS_RXPin = A1, GPS_SYSONPin = A2, GPS_ONOFFPin = A3) and I2C (SDA = A4, SCL = A5).

Please advise.


5
Wirelings / RobotZero and stepper
« on: January 25, 2022, 10:59:05 PM »
I saw the StarTracker tutorial and decided to try that out. I tried to build the RTC_GPS_IMU code, but soon found myself in dependency despair.

To make progress, I decomposed the effort into the IMU, steppers, and GPS. The IMU code works a treat!

The stepper motors, however, are just not moving.

The serial output appears as expected, but the motor doesn't actually move. I've tried the RobotZero with just the USB cable and USB + 1500mAh battery. I've tried the Motor1 and Motor2 ports with the appropriate code changes.

Code: [Select]
/**********************************************************************
 * RobotZero Peripheral Basics
 * This program illustrates the abilities of the RobotZero processor
 * board by spinning any attached motors while reading the
 * accelerometer data of the onboard 9-Axis sensor.
 *
 * NOTES:
 *   - Serial Monitor must be open for program to run.
 *   - Battery must be plugged in to power motors.
 *
 * Hardware by: TinyCircuits
 * Written by: Ben Rose & LaverĂ©na Wienclaw for TinyCircuits
 *
 * Initialized: June 2019
 * Last modified: Jan 2020
 *
 * Modified by: DNL, Jan 2022
 **********************************************************************/

#include <Wire.h>

#define SerialMonitorInterface SerialUSB // for SAMD21 processors

void setup() {

  // Enable serial
  SerialMonitorInterface.begin( 9600 );
  while (!SerialMonitorInterface); // Halt everything until Serial Monitor is opened
  SerialMonitorInterface.println( "Motors" );

  // Enable Wire
  Wire.begin();

  // Initialize stepper motor driver
  stepperInit();
  delay( 100 );

}

void loop() {

  // Motors go forward
  SerialMonitorInterface.print( "Start..." );
  setMotorCurrent( 100 );
  setMotor( 1, 10 );
  delay( 1000 ); //delay to allow motors to move

  SerialMonitorInterface.println( "Stop." );
  setMotorCurrent( 1 );
  setMotor( 1, 0 );
  delay( 1000 );

}

Cluebats are most welcome!!!


Pages: 1
SMF spam blocked by CleanTalk