September 28, 2020, 12:37:08 pm

Recent posts

Pages1 2 3 ... 10
1
A64 / Re: A64 Sound Problem
Last post by Faruk - Today at 10:53:57 am
Hello again.

When I use `speaker-test` command, the sound is distorted. When I use `speaker-test -twav` I can understand spoken words but sounds as pitched.

When I tried play any mp3, just I heared distorted sound. I tried `mplayer`, `vlc`, `mpv` but results same. I cannot hear a proper sound from the headphone jack. Any suggestion?

Alsamixer Card: sun50i-a64-audio
Linux version: 5.8.7-olimex
Ubuntu 18.04 (created with olimage)
2
A20 / [A20 Lime2] PWM on vanilla 5.6...
Last post by jhuge - September 25, 2020, 07:36:21 pm
Hello,

I have a A20 OLinuXino Lime2 board running vanilla 5.6 kernel with PREEMPT_RT patch, and I'm not sure how I should go about to get hardware PWM output on a GPIO pin.

This guide doesn't seem to apply to my case since I don't have the pwm-sunxi driver config available when compiling the kernel, and I'm not sure how to add it, and if it would work with 5.6 kernel.
I only have pwm_sun4i driver, but my /sys/class/pwm is empty. The pwm entry in the dts tree is disabled, so maybe I would need to add dtoverlay boot parameters, but I'm not sure what command to use.

I would prefer not to use software PWM because I already have hard real time tasks running.

Can anyone help me ?
3
ESP32 / Re: Using pins in Olimex ESP32...
Last post by kordhrufan - September 25, 2020, 01:21:39 pm
Thanks for the reply Stanimir, I forgot to update the comments so you can ignore them, I realized that you have to read the pins following the GPIO and not the physical pin.

Right now I want to make a simple counter additon for each time I activate the interruptor, making the led of the REL1 blink. But I encounter some problems in the making of the led blink.

Also I make some mistakes in the making of the code since I call the attachInterrupt function two times and configure 2 inputs in pinMode, so I fixed that and this is the code I have:

#include <Arduino.h>

const int timeThreshold = 150;
int ledPin = 32;
const int intPin = 4;
volatile int ISRCounter = 0;
int counter = 0;
long startTime = 0;
int val = 0;   
 

struct Button {
  const uint8_t PIN;
  uint32_t numberKeyPresses;
  bool pressed;
};

Button button1 = {intPin, 0, false};

void IRAM_ATTR isr() {
  button1.numberKeyPresses += 1;
  button1.pressed = true;

}

void debounceCount()
{
   if (millis() - startTime > timeThreshold)
   {
      ISRCounter++;
      startTime = millis();
   }
}

void setup() {
  Serial.begin(115200);
  pinMode(button1.PIN, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(intPin), debounceCount, FALLING);
  pinMode(ledPin, OUTPUT);
//  pinMode(intPin, INPUT);   
}

void loop() {
  if (button1.pressed) {
      Serial.printf("Button 1 has been pressed %u times\n", button1.numberKeyPresses);
      button1.pressed = false;
  }

  if (counter != ISRCounter)
   {
      counter = ISRCounter;
      Serial.println(counter);
      val = digitalRead(intPin);   // read the input pin
      digitalWrite(ledPin, intPin);  // sets the LED to the button's value
   }
}

I appreciate all the help you could give me
4
PINGUINO / Re: Windows Drivers
Last post by LubOlimex - September 25, 2020, 11:51:01 am
Hello,

Sorry for the experience and thank you for the notice.

QuoteThe official "PIC32-PINGUINO-MICRO user manual" states that:

"Before connecting your board, download the Microchip modified driver provided by hackinglab:
http://www.hackinglab.org/pinguino/download/driver%20pinguino%20windows/
"
but this link is BROKEN.

This is not written in the user's manual, but in "PIC32-Pinguino_Installation_Instructions_Revised.pdf". Anyway, the document is very outdated and irrelevant, I will delete it and remove any references to it. It is best to ignore it and just visit the official Pinguino IDE page. Then download and install Pinguino IDE from here:

https://pinguino.cc/download/

During installation it asks you to install drivers as shown in the picture below:



QuoteDispite the fact that a reputable company should provide this driver itself (This is the step ONE when you get their boards in your hands, and then the only feeling is frastration),

Hosting the drivers ourselves would be a bad idea since the drivers are related to the bootloader and the software used in each project and we don't maintain any software related to PIC32-PINUGINO-MICRO. The board was made for the Pinguino software projects, we just made the hardware and collaborated with the software maintainers. Since then other projects become available (MPIDE, ChipKIT Arduino package) that can also be used with the board (but require different bootloader and drivers), these project are also not maintained by Olimex, aside from the Arduino IDE package and instructions here:

https://github.com/OLIMEX/Arduino_configurations/tree/master/PIC
5
PINGUINO / Windows Drivers
Last post by bill8n95 - September 25, 2020, 11:15:56 am
The official "PIC32-PINGUINO-MICRO user manual" states that:

"Before connecting your board, download the Microchip modified driver provided by hackinglab:
http://www.hackinglab.org/pinguino/download/driver%20pinguino%20windows/
"
but this link is BROKEN.
Also, I searched online but I did not get any results.

Dispite the fact that a reputable company should provide this driver itself (This is the step ONE when you get their boards in your hands, and then the only feeling is frastration),

can anyone else help ?
Thank you
6
ESP32 / Re: Using pins in Olimex ESP32...
Last post by Stanimir5F - September 25, 2020, 09:18:03 am
Hello kordhrufan!

From the photos you have posted I can see that you have connected button wires to pins 5 and 38 (not 37) on the extension. Pins 37 and 38 pins are both 3.3V so this shouldn't make any difference. But pin 5 on the extension is actually GPIO4 (the first pin is GPIO0 and that's why this offset exist), while GPIO5 (the one you have initialized in code) is extension pin 6.

Also this these three comments confuse me a little bit:
int inPin = 5;    // pushbutton connected to digital pin 7
int ledPin = 32;  // LED connected to digital pin 13
....
pinMode(inPin, INPUT);    // sets the digital pin 7 as input
Obviously comments are comments and they don't affect the code itself but is your idea to attach it (the button) to GPIO 5 or 7? And similar for the LED should it be on 32 or 13? Are these comments just a leftover from before?

As for the code section itself it seems fine at first glance. And if this change of pin doesn't solve the problem I would recommend you to start with a simplified version of the sketch until you sort out the issue. You can check the example Arduino provide about interrupt service routine (ISR).

Stan, Olimex
7
ESP32 / Using pins in Olimex ESP32-EVB...
Last post by kordhrufan - September 24, 2020, 04:55:54 pm
Hello I recently adquire an Olimex Board and want to attach some interruptors and connectors for a major project, this is what I have:


 
As you can see I weld two connectos to the GPIO 40 pin connector with all ESP32 ports and connected an interruptor



I want to test the interruptor so I connect the 37 pin and the 5 pin, but the problem I have is that doesn't seem to detect when I press the interrupt, I tested other pin and leds and the board acts strange, this is my code

#include <Arduino.h>

const int timeThreshold = 150;
volatile int ISRCounter = 0;
int counter = 0;
long startTime = 0;
 
int ledPin = 32;  // LED connected to digital pin 13
int inPin = 5;    // pushbutton connected to digital pin 7
int val = 0;      // variable to sto   the read value

struct Button {
  const uint8_t PIN;
  uint32_t numberKeyPresses;
  bool pressed;
};

Button button1 = {5, 0, false};

void IRAM_ATTR isr() {
  button1.numberKeyPresses += 1;
  button1.pressed = true;
}

void debounceCount()
{
if (millis() - startTime > timeThreshold)
{
ISRCounter++;
startTime = millis();
}
}

void setup() {
  Serial.begin(115200);
  pinMode(button1.PIN, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(inPin), debounceCount, FALLING);
  pinMode(ledPin, OUTPUT);  // sets the digital pin 13 as output
  pinMode(inPin, INPUT);    // sets the digital pin 7 as input
  attachInterrupt(button1.PIN, isr, FALLING);
  Serial.printf("Presione un botón");
}

void loop() {
  if (button1.pressed) {
      Serial.printf("Button 1 has been pressed %u times\n", button1.numberKeyPresses);
      button1.pressed = false;
      val = digitalRead(inPin);   // read the input pin
      digitalWrite(ledPin, val);  // sets the LED to the button's value
  }

  //Detach Interrupt after 1 Minute
  static uint32_t lastMillis = 0;
  if (millis() - lastMillis > 60000) {
    lastMillis = millis();
    detachInterrupt(button1.PIN);
     Serial.println("Interrupt Detached!");
  }

  if (counter != ISRCounter)
{
counter = ISRCounter;
Serial.println(counter);
}
}

What I'm doing wrong?
8
ESP32 / Re: ESP32-POE-ISO GPIO3 & POE
Last post by LubOlimex - September 24, 2020, 03:06:39 pm
Umm, looking at the schematic it seems GPIO3 is also connected to the USB-serial converter CH340T (second function U0RXD). So when you have USB connected probably the pull up (R19) is making your button work. When no USB is present, there is no pull up and it is not clear what is the state of that wire GPIO3/U0RXD.

My advice is to use another pin instead of GPIO3. You can use other pins for example GPIO16 is a good pin.
9
ESP32 / ESP32-POE-ISO GPIO3 & POE
Last post by Tritu - September 24, 2020, 10:27:12 am
Got a small project going with an ESP32-POE-ISO. Just 4 touchless buttons that send UDP commands, nothing fancy. But now i bumped into the following issue. The button connected to GPIO3 seemed to work when the ESP-POE-ISO was powered over USB and connected to Ethernet without POE but not when powered over POE. I am probably overlooking something. But does anyone have a explanation? The other 3 buttons are connected to GPIO2, GPIO4 and GPIO5.
10
JTAG / Re: ARM-USB-TINY-H 1.8v jtag s...
Last post by LubOlimex - September 24, 2020, 08:18:53 am
Both units have same FTDI chip which works down at 2V but ARM-USB-OCD-H design also incorporates SN74LVC2T45 voltage translators that allow reliable lower voltage operation (down to 1.65V).

The design is propriety and we don't share the schematic but we usually try to provide details if you need such.
Pages1 2 3 ... 10