News:

LATEST RELEASE:  FPP 8.5.1 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/8.5

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 16969
Latest: eglass90
New This Month: 7
New This Week: 2
New Today: 1
Stats
Total Posts: 135733
Total Topics: 17043
Most Online Today: 147
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 0
Guests: 97
Total: 97

arduino and fpp

Started by andrewm659, April 24, 2024, 09:46:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andrewm659

Quote from: MikeKrebs on April 25, 2024, 08:56:53 PM
Quote from: andrewm659 on April 24, 2024, 09:00:40 PMHere is the sketch from LSPi

The sketch you copied in doesn't look like it is doing any interaction with LSPi. It is some generic telephone keypad simulator? It is not outputting any WS2811 protocol so it couldn't be driving your pixels.
I will double check on this today.

andrewm659

Quote from: MikeKrebs on April 25, 2024, 08:51:17 PMLet's get FPP running your pixels. Did you load up the virtual eeprom? You do this from the menu Input/Output Setup, Channel Outputs, an then the Pixel Strings tab. Click the button to install EEProm and choose PiHat.

Once installed you have you two outputs to configure with the number of pixels you are running. You only need configure whatever you have attached.

Once you have that, you can use the test function under Status/Control.


Pretty sure I loaded the virtual EEProm on the server AND remote.

Right now I have WS2811 connected to it.

andrewm659

Here is the global.h code.  This is probably what you were looking for...

#include <EEPROM.h>

#define FIRMWARE_VER 3

#define ONEWIREPIN 2

#define BAUD_RATE 1000000

template <class T> int EEPROM_writeAnything(int ee, const T& value)
{
  const byte* p = (const byte*)(const void*)&value;
  unsigned int i;
  for (i = 0; i < sizeof(value); i++)
    EEPROM.write(ee++, *p++);
  return i;
}

template <class T> int EEPROM_readAnything(int ee, T& value)
{
  byte* p = (byte*)(void*)&value;
  unsigned int i;
  for (i = 0; i < sizeof(value); i++)
    *p++ = EEPROM.read(ee++);
  return i;
}

#define rebootPin 15
inline void doReboot()
{
  digitalWrite(rebootPin, HIGH);
  while (1);
}

namespace CMDTYPE
{
  enum CMDTYPE
  {
    SETUP_DATA = 1,
    PIXEL_DATA = 2,
    BRIGHTNESS = 3,
    GETID      = 4,
    SETID      = 5,
    GETVER     = 6
  };
}

namespace RETURN_CODES
{
  enum RETURN_CODES
  {
    SUCCESS = 255,
    REBOOT = 42,
    ERROR = 0,
    ERROR_SIZE = 1,
    ERROR_UNSUPPORTED = 2,
    ERROR_PIXEL_COUNT = 3,
    ERROR_BAD_CMD = 4,
  };
}

#define FREE_RAM_BUFFER 180


//#define GENERIC 0
#define LPD8806 1
#define WS2801 2
//NEOPIXEL also known as WS2811, WS2812, WS2812B, APA104
#define NEOPIXEL 3
//400khz variant of above
#define WS2811_400 4
#define TM1809_TM1804 5
#define TM1803 6
#define UCS1903 7
#define SM16716 8
#define APA102 9
#define LPD1886 10
#define P9813 11

struct config_t
{
  uint8_t type;
  uint16_t pixelCount;
  uint8_t spiSpeed;
} config;
#define CONFIGCHECK 7


void writeConfig()
{
  EEPROM_writeAnything(1, config);
}

void readConfig()
{
  EEPROM_readAnything(1, config);
}

void writeDefaultConfig()
{
  config.type = LPD8806;
  config.pixelCount = 1;
  config.spiSpeed = 16;
  writeConfig();
  EEPROM.write(16, 0);
}

uint32_t freeRam()
{
  extern int __heap_start, *__brkval;
  int v;
  return (int)&v - (__brkval == 0 ? (int)&__heap_start : (int)__brkval);
}

darylc

Quote from: andrewm659 on April 26, 2024, 01:26:29 PMHere is the global.h code.  This is probably what you were looking for...



Nope that also looks irrelevant.

MikeKrebs

Quote from: andrewm659 on April 26, 2024, 07:39:29 AM
Quote from: MikeKrebs on April 25, 2024, 08:51:17 PMLet's get FPP running your pixels. Did you load up the virtual eeprom? You do this from the menu Input/Output Setup, Channel Outputs, an then the Pixel Strings tab. Click the button to install EEProm and choose PiHat.

Once installed you have you two outputs to configure with the number of pixels you are running. You only need configure whatever you have attached.

Once you have that, you can use the test function under Status/Control.


Pretty sure I loaded the virtual EEProm on the server AND remote.

Right now I have WS2811 connected to it.
When you run a test, do you get expected results?

andrewm659

Quote from: darylc on April 26, 2024, 09:28:06 PM
Quote from: andrewm659 on April 26, 2024, 01:26:29 PMHere is the global.h code.  This is probably what you were looking for...



Nope that also looks irrelevant.
I'm trying!   ;D

andrewm659

Quote from: MikeKrebs on April 26, 2024, 09:53:19 PM
Quote from: andrewm659 on April 26, 2024, 07:39:29 AM
Quote from: MikeKrebs on April 25, 2024, 08:51:17 PMLet's get FPP running your pixels. Did you load up the virtual eeprom? You do this from the menu Input/Output Setup, Channel Outputs, an then the Pixel Strings tab. Click the button to install EEProm and choose PiHat.

Once installed you have you two outputs to configure with the number of pixels you are running. You only need configure whatever you have attached.

Once you have that, you can use the test function under Status/Control.


Pretty sure I loaded the virtual EEProm on the server AND remote.

Right now I have WS2811 connected to it.
When you run a test, do you get expected results?

I do not.  I will try it again later tonight...?

andrewm659

Hello,
It is not working.  Not sure what I'm doing wrong.

MikeKrebs

I'd suggest you hop on the xLights zoom room https://zoom.us/j/175801909?pwd=ZU1hNzM5bjJpOGZ1d1BOb1BzMUFndz09 and raise your hand. Someone can try to help you interactively. If you have a video camera you can aim at stuff it would be helpful but even without one, talking with live help desk will save you countless hours of frustration.

Support FPP

+- Recent Topics

QN8066 FM Transmitter by MikeKrebs
July 16, 2025, 08:35:29 PM

Plugin for scoreboard data from node red by sharkboy005
July 16, 2025, 03:06:54 PM

Scoreboard Plugin by sharkboy005
July 16, 2025, 03:05:09 PM

Falcon 16v4 configuring to smart receivers by JonD
July 14, 2025, 05:26:28 AM

E1.31 Bridge Mode - Crash by Poporacer
July 13, 2025, 10:54:02 PM

E fuse api by Jrbrown
July 12, 2025, 08:06:48 PM

FPP VS eero home network Static IP challenges by JonD
July 11, 2025, 06:11:50 PM

Setting up a wired on demand show on Pi/ FPP to push a show to Falcon Controller by lunchour
July 03, 2025, 03:57:56 PM

ELM (Enttec LED Mapper) and FPP with bare RPi questions by ericjforman
July 02, 2025, 03:10:16 PM

xCapture Playback Issues by ericjforman
July 02, 2025, 11:38:48 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod